VisualStudioCodeCredential Class

Authenticates as the Azure user signed in to Visual Studio Code.

Inheritance
azure.identity._internal.get_token_mixin.GetTokenMixin
VisualStudioCodeCredential

Constructor

VisualStudioCodeCredential(**kwargs)

Parameters

authority
str

Authority of an Azure Active Directory endpoint, for example 'login.microsoftonline.com', the authority for Azure Public Cloud (which is the default). AzureAuthorityHosts defines authorities for other clouds.

tenant_id
str

ID of the tenant the credential should authenticate in. Defaults to the "organizations" tenant, which supports only Azure Active Directory work or school accounts.

Methods

get_token

Request an access token for scopes as the user currently signed in to Visual Studio Code.

This method is called automatically by Azure SDK clients.

get_token

Request an access token for scopes as the user currently signed in to Visual Studio Code.

This method is called automatically by Azure SDK clients.

get_token(*scopes, **kwargs)

Parameters

scopes
str
Required

desired scopes for the access token. This method requires at least one scope.

Return type

Exceptions

~azure.identity.CredentialUnavailableError

the credential cannot retrieve user details from Visual Studio Code