Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VisualStudioCodeCredentials does not work on WSL2 [BUG] #23758

Closed
tshaiman opened this issue Sep 2, 2021 · 2 comments
Closed

VisualStudioCodeCredentials does not work on WSL2 [BUG] #23758

tshaiman opened this issue Sep 2, 2021 · 2 comments
Assignees
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library.

Comments

@tshaiman
Copy link
Member

tshaiman commented Sep 2, 2021

Describe the bug
when working against Cosmos Db with VisualStudioCodeCredentials (after login to the Azure Subscription)
The following exception is thrown :

Exception has occurred: CLR/Azure.Identity.CredentialUnavailableException
An exception of type 'Azure.Identity.CredentialUnavailableException' occurred in System.Private.CoreLib.dll but was not handled in user code: 'Stored credentials not found. Need to authenticate user in VSCode Azure Account.'

The same code with the same Azure Subscription after login is working on Windows.

Expected behavior

  • VisualStudioCodeCredentials should work in WSL2

Actual behavior (include Exception or Stack Trace)
Exception is thrown :

Exception has occurred: CLR/Azure.Identity.CredentialUnavailableException
An exception of type 'Azure.Identity.CredentialUnavailableException' occurred in System.Private.CoreLib.dll but was not handled in user code: 'Stored credentials not found. Need to authenticate user in VSCode Azure Account.'
 Inner exceptions found, see $exception in variables window for more details.
 Innermost exception 	 System.NullReferenceException : Object reference not set to an instance of an object.
   at Azure.Identity.VisualStudioCodeCredential.IsRefreshTokenString(String str)
   at Azure.Identity.VisualStudioCodeCredential.GetStoredCredentials(String environmentName)

To Reproduce
Steps to reproduce the behavior (include a code snippet, screenshot, or any additional information that might help us reproduce the issue)

  1. Open VS Code in WSL2 , and login to Azure Subscription using the Azure Account Plugin
  2. Run a sample code that uses VisualStudioCodeCredentials for example
var cosmosClient = new CosmosClient(endpoint, new Azure.Identity.VisualStudioCodeCredential());

Environment:
Azure.Identity 1.4.1 , Microsoft.Azure.Cosmos 3.20.1
OS Name: ubuntu
OS Version: 18.04
OS Platform: Linux
.Net Sdk 5.0.301
Vs Code Version 1.60.0

@ghost ghost added the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Sep 2, 2021
@jsquire jsquire added Azure.Identity Client This issue points to a problem in the data-plane of the library. labels Sep 3, 2021
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Sep 3, 2021
@jsquire
Copy link
Member

jsquire commented Sep 3, 2021

Thank you for your feedback. Tagging and routing to the team members best able to assist.

@christothes
Copy link
Member

closing until #30525 is addressed

@github-actions github-actions bot locked and limited conversation to collaborators Jun 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library.
Projects
None yet
Development

No branches or pull requests

4 participants