Skip to content

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

Closed

Description

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

Activity

  1. chlowell commented on Nov 11, 2020

    @chlowell
    MemberAuthor

    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.

  2. locked and limited conversation to collaborators on Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

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