Troubleshooting `VisualStudioCredential`
See original GitHub issueLibrary name and version
Azure.Identity
Query/Question
I am reading this page: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/troubleshooting.md
(Which btw has broken links in this section)
And am looking under VisualStudioCredential
. My Tools -> Options -> Azure Service Authentication
is set with my Azure account. I have tried logging in and logging out (even clearing out the Identity folder/cache) but this still fails to work for me.
I am able to use environmental variables, so I have a workaround in the meantime. However it would be great to figure out what is going on here and perhaps add to the documentation to assist others that are running into the same issue.
Thank you for any assistance you can provide. 🙏
Environment
Windows 10 Visual Studio 2022 17.1 Preview 2
Issue Analytics
- State:
- Created 2 years ago
- Comments:35 (14 by maintainers)
Top GitHub Comments
OK! Pardon the confusion here @christothes I did try that earlier but apparently, I was running into some sort of state problem and/or needed to restart Visual Studio. I can now confirm that setting the
AZURE_TENANT_ID
along with setting the live.com account inAzure Service Authentication
does in fact work as expected! All things considered, this is an acceptable workaround for me until further work is done on your end to formally select this property via theAzure Service Authentication
interface.My only remaining suggestion would be to consider updating the documentation to reflect this as a known issue along with this suggested workaround. Beyond that, as far as I am concerned, I am satisfied with this approach and will now take this issue off my nag list. 😇
Thank you very much for your patience and efforts out there. 🙏👍
Hi @Mike-E-angelo Sorry for the delay - To your question about AZURE_TENANT_ID - if you are using DefaultAzureCredential, we should be pulling the TenantId from the environment as a default. Are you not seeing that behavior in your environment?
https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/Credentials/DefaultAzureCredentialOptions.cs#L36