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

DefaultAzureCredential fails with "[Error 2] The system cannot find the file specified" #13107

Closed
chlowell opened this issue Aug 14, 2020 · 1 comment
Assignees
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library.

Comments

@chlowell
Copy link
Member

chlowell commented Aug 14, 2020

This affects Python 2.7 on Windows. The root cause is in msal-extensions (AzureAD/microsoft-authentication-extensions-for-python#69). Excluding SharedTokenCacheCredential is a workaround:

DefaultAzureCredential(exclude_shared_token_cache_credential=True)

Another workaround is to create the missing file:

import os
from msal_extensions import FilePersistence

persistence = FilePersistence(os.environ['LOCALAPPDATA'] + '\.IdentityService\msal.cache')
persistence.save('')
@chlowell chlowell added Client This issue points to a problem in the data-plane of the library. Azure.Identity labels Aug 14, 2020
@chlowell chlowell self-assigned this Aug 14, 2020
@chlowell chlowell added this to the [2020] November milestone Oct 20, 2020
@chlowell
Copy link
Member Author

This was fixed in msal-extensions 0.3.0, which is required by azure-identity 1.5.0. If you see this error, please update your dependencies.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 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

1 participant