Skip to content

Commit

Permalink
[Identity] Add more detail to VSCodeCred class doc (Azure#27013)
Browse files Browse the repository at this point in the history
Add more details to the VisualStudioCodeCredential class
docstring to let users know about its current shortcomings.

Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
  • Loading branch information
pvaneck authored Oct 26, 2022
1 parent 47dfd59 commit ada565c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,12 @@ def _initialize(self, vscode_user_settings, **kwargs):


class VisualStudioCodeCredential(_VSCodeCredentialBase, GetTokenMixin):
"""Authenticates as the Azure user signed in to Visual Studio Code.
"""Authenticates as the Azure user signed in to Visual Studio Code via the 'Azure Account' extension.
It's a `known issue <https://github.com/Azure/azure-sdk-for-python/issues/23249>`_ that this credential doesn't
work with `Azure Account extension <https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account>`_
versions newer than **0.9.11**. A long-term fix to this problem is in progress. In the meantime, consider
authenticating with :class:`AzureCliCredential`.
:keyword str authority: 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@


class VisualStudioCodeCredential(_VSCodeCredentialBase, AsyncContextManager, GetTokenMixin):
"""Authenticates as the Azure user signed in to Visual Studio Code.
"""Authenticates as the Azure user signed in to Visual Studio Code via the 'Azure Account' extension.
It's a `known issue <https://github.com/Azure/azure-sdk-for-python/issues/23249>`_ that this credential doesn't
work with `Azure Account extension <https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account>`_
versions newer than **0.9.11**. A long-term fix to this problem is in progress. In the meantime, consider
authenticating with :class:`AzureCliCredential`.
:keyword str authority: 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
Expand Down

0 comments on commit ada565c

Please sign in to comment.