VisualStudioCodeCredential Class
Authenticates as the Azure user signed in to Visual Studio Code.
- Inheritance
-
azure.identity._credentials.vscode._VSCodeCredentialBaseVisualStudioCodeCredentialazure.identity.aio._internal.AsyncContextManagerVisualStudioCodeCredentialazure.identity.aio._internal.get_token_mixin.GetTokenMixinVisualStudioCodeCredential
Constructor
VisualStudioCodeCredential(**kwargs: Any)
Parameters
- authority
- str
authority of an Azure Active Directory endpoint, for example "login.microsoftonline.com". This argument is required for a custom cloud and usually unnecessary otherwise. Defaults to the authority matching the "Azure: Cloud" setting in VS Code's user settings or, when that setting has no value, the authority for Azure Public Cloud.
- tenant_id
- str
ID of the tenant the credential should authenticate in. Defaults to the "Azure: Tenant" setting in VS Code's user settings or, when that setting has no value, the "organizations" tenant, which supports only Azure Active Directory work or school accounts.
Methods
| close |
Close the credential's transport session. |
| 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. |
close
Close the credential's transport session.
async close() -> None
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.
async get_token(*scopes: str, **kwargs: Any) -> AccessToken
Parameters
- tenant_id
- str
optional tenant to include in the token request.
Return type
Exceptions
the credential cannot retrieve user details from Visual Studio Code
Feedback
Submit and view feedback for