Class VisualStudioCodeCredentialBuilder

All Implemented Interfaces:
com.azure.core.client.traits.HttpTrait<VisualStudioCodeCredentialBuilder>

@Deprecated public class VisualStudioCodeCredentialBuilder extends CredentialBuilderBase<VisualStudioCodeCredentialBuilder>
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.
Fluent credential builder for instantiating a VisualStudioCodeCredential.

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:
  • Constructor Details

    • VisualStudioCodeCredentialBuilder

      public VisualStudioCodeCredentialBuilder()
      Deprecated.
      Constructs an instance of VisualStudioCodeCredentialBuilder.
  • Method Details

    • tenantId

      public VisualStudioCodeCredentialBuilder tenantId(String tenantId)
      Deprecated.
      Sets the tenant id of the user to authenticate through the VisualStudioCodeCredential. The default is the tenant the user originally authenticated to via the Visual Studio Code Azure Account plugin.
      Parameters:
      tenantId - the tenant ID to set.
      Returns:
      An updated instance of this builder with the tenant id set as specified.
    • additionallyAllowedTenants

      public VisualStudioCodeCredentialBuilder additionallyAllowedTenants(String... additionallyAllowedTenants)
      Deprecated.
      Specifies tenants in addition to the specified tenantId for which the credential may acquire tokens. Add the wildcard value "*" to allow the credential to acquire tokens for any tenant the logged in account can access. If no value is specified for tenantId this option will have no effect, and the credential will acquire tokens for any requested tenant.
      Parameters:
      additionallyAllowedTenants - the additionally allowed tenants.
      Returns:
      An updated instance of this builder with the additional tenants configured.
    • additionallyAllowedTenants

      public VisualStudioCodeCredentialBuilder additionallyAllowedTenants(List<String> additionallyAllowedTenants)
      Deprecated.
      Specifies tenants in addition to the specified tenantId for which the credential may acquire tokens. Add the wildcard value "*" to allow the credential to acquire tokens for any tenant the logged in account can access. If no value is specified for tenantId this option will have no effect, and the credential will acquire tokens for any requested tenant.
      Parameters:
      additionallyAllowedTenants - the additionally allowed tenants.
      Returns:
      An updated instance of this builder with the additional tenants configured.
    • build

      Deprecated.
      Creates a new VisualStudioCodeCredential with the current configurations.
      Returns:
      a VisualStudioCodeCredential with the current configurations.