Class VisualStudioCodeCredential

java.lang.Object
com.azure.identity.VisualStudioCodeCredential
All Implemented Interfaces:
com.azure.core.credential.TokenCredential

@Deprecated public class VisualStudioCodeCredential extends Object implements com.azure.core.credential.TokenCredential
Deprecated.
This credential is deprecated because the VS Code Azure Account extension on which this credential relies has been deprecated. Users should use other dev-time credentials, such as AzureCliCredential, AzureDeveloperCliCredential, AzurePowerShellCredential or IntelliJCredential for their local development needs. See this issue for Azure Account extension deprecation notice.

Enables authentication to Microsoft Entra ID as the user signed in to Visual Studio Code via the 'Azure Account' extension.

It's a known issue that this credential doesn't work with Azure Account extension versions newer than 0.9.11. A long-term fix to this problem is in progress. In the meantime, consider authenticating with AzureCliCredential.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Mono<com.azure.core.credential.AccessToken>
    getToken(com.azure.core.credential.TokenRequestContext request)
    Deprecated.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.core.credential.TokenCredential

    getTokenSync
  • Method Details

    • getToken

      public Mono<com.azure.core.credential.AccessToken> getToken(com.azure.core.credential.TokenRequestContext request)
      Deprecated.
      Specified by:
      getToken in interface com.azure.core.credential.TokenCredential