Skip to content

Commit ada565c

Browse files
authored
[Identity] Add more detail to VSCodeCred class doc (#27013)
Add more details to the VisualStudioCodeCredential class docstring to let users know about its current shortcomings. Signed-off-by: Paul Van Eck <[email protected]>
1 parent 47dfd59 commit ada565c

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

sdk/identity/azure-identity/azure/identity/_credentials/vscode.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,12 @@ def _initialize(self, vscode_user_settings, **kwargs):
112112

113113

114114
class VisualStudioCodeCredential(_VSCodeCredentialBase, GetTokenMixin):
115-
"""Authenticates as the Azure user signed in to Visual Studio Code.
115+
"""Authenticates as the Azure user signed in to Visual Studio Code via the 'Azure Account' extension.
116+
117+
It's a `known issue <https://github.com/Azure/azure-sdk-for-python/issues/23249>`_ that this credential doesn't
118+
work with `Azure Account extension <https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account>`_
119+
versions newer than **0.9.11**. A long-term fix to this problem is in progress. In the meantime, consider
120+
authenticating with :class:`AzureCliCredential`.
116121
117122
:keyword str authority: Authority of an Azure Active Directory endpoint, for example "login.microsoftonline.com".
118123
This argument is required for a custom cloud and usually unnecessary otherwise. Defaults to the authority

sdk/identity/azure-identity/azure/identity/aio/_credentials/vscode.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@
1818

1919

2020
class VisualStudioCodeCredential(_VSCodeCredentialBase, AsyncContextManager, GetTokenMixin):
21-
"""Authenticates as the Azure user signed in to Visual Studio Code.
21+
"""Authenticates as the Azure user signed in to Visual Studio Code via the 'Azure Account' extension.
22+
23+
It's a `known issue <https://github.com/Azure/azure-sdk-for-python/issues/23249>`_ that this credential doesn't
24+
work with `Azure Account extension <https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account>`_
25+
versions newer than **0.9.11**. A long-term fix to this problem is in progress. In the meantime, consider
26+
authenticating with :class:`AzureCliCredential`.
2227
2328
:keyword str authority: Authority of an Azure Active Directory endpoint, for example "login.microsoftonline.com".
2429
This argument is required for a custom cloud and usually unnecessary otherwise. Defaults to the authority

0 commit comments

Comments
 (0)