Skip to content

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

Closed
@chlowell

Description

@chlowell

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('')

Metadata

Metadata

Assignees

Labels

Azure.IdentityClientThis issue points to a problem in the data-plane of the library.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions