Class VisualStudioCodeCredential

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

public class VisualStudioCodeCredential extends Object implements com.azure.core.credential.TokenCredential
Enables authentication to Microsoft Entra ID using the user account signed in through the Azure Resources extension in Visual Studio Code.

Prerequisites:

  1. Install the Azure Resources extension in Visual Studio Code and sign in using the Azure: Sign In command.
  2. Add the azure-identity-broker dependency to your project's build configuration.
See Also:
  • Method Details

    • getToken

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