VisualStudioCodeCredentialBuilder Class
- java.
lang. Object - com.
azure. identity. CredentialBuilderBase<T> - com.
azure. identity. VisualStudioCodeCredentialBuilder
- com.
- com.
public class VisualStudioCodeCredentialBuilder
extends CredentialBuilderBase<VisualStudioCodeCredentialBuilder>
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.
Constructor Summary
Constructor | Description |
---|---|
VisualStudioCodeCredentialBuilder() |
Constructs an instance of Visual |
Method Summary
Modifier and Type | Method and Description |
---|---|
Visual |
additionallyAllowedTenants(String[] additionallyAllowedTenants)
Specifies tenants in addition to the specified tenant |
Visual |
additionallyAllowedTenants(List<String> additionallyAllowedTenants)
Specifies tenants in addition to the specified tenant |
Visual |
build()
Creates a new VisualStudioCodeCredential with the current configurations. |
Visual |
tenantId(String tenantId)
Sets the tenant id of the user to authenticate through the VisualStudioCodeCredential. |
Methods inherited from CredentialBuilderBase
Methods inherited from java.lang.Object
Constructor Details
VisualStudioCodeCredentialBuilder
public VisualStudioCodeCredentialBuilder()
Constructs an instance of VisualStudioCodeCredentialBuilder.
Method Details
additionallyAllowedTenants
public VisualStudioCodeCredentialBuilder additionallyAllowedTenants(String[] additionallyAllowedTenants)
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:
Returns:
additionallyAllowedTenants
public VisualStudioCodeCredentialBuilder additionallyAllowedTenants(List
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:
Returns:
build
public VisualStudioCodeCredential build()
Creates a new VisualStudioCodeCredential with the current configurations.
Returns:
tenantId
public VisualStudioCodeCredentialBuilder tenantId(String tenantId)
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:
Returns:
Applies to
Azure SDK for Java