Skip to content

[Resolved in 1.32.3] msal 1.32.2 has broken our authentication from on-premise servers #815

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

Closed
sdg002 opened this issue Apr 25, 2025 · 3 comments
Labels
Fixed Possible-Solution regression Behavior that worked in a previous release that no longer works in a newer release Similar-Issue

Comments

@sdg002
Copy link

sdg002 commented Apr 25, 2025

Describe the bug
We were deploying some Python jobs and we encountered this error . The initial suspicion was on any environmental changes on the Server (Windows via Azure AD) . But that was ruled out. We had to roll back msal to 1.32.0

azure.core.exceptions.ClientAuthenticationError: DefaultAzureCredential failed to retrieve a token from the included credentials.
Attempted credentials:
	EnvironmentCredential: EnvironmentCredential authentication unavailable. Environment variables are not fully configured.
Visit https://aka.ms/azsdk/python/identity/environmentcredential/troubleshoot to troubleshoot this issue.
	ManagedIdentityCredential: Azure Arc managed identity configuration not found in environment. Unrecognizable WWW-Authenticate header: {}
To mitigate this issue, please refer to the troubleshooting guidelines here at https://aka.ms/azsdk/python/identity/defaultazurecredential/troubleshoot.

To Reproduce

from azure.keyvault.secrets import SecretClient
from azure.identity import DefaultAzureCredential

creds=DefaultAzureCredential()
vault_url="https://YOUR_KEY_VAULT.vault.azure.net"
client = SecretClient(vault_url=vault_url, credential=creds)

print("Going to get secret")
secret_value=client.get_secret(name="YOUR_SECRET")
print("Got secret")
print(f"Secret value: {secret_value.value}")
print("Done")

Expected behavior

The script about should have fetched the secret value.

What you see instead
We see the exception message. See above.

The MSAL Python version you are using
Paste the output of this
1.32.2

Additional context
We rolled back msal to 1.32.0 and it works for now

Copy link

Here are some similar issues that might help you. Please check if they can solve your problem.


Possible solution (Extracted from existing issue, might be incorrect; please verify carefully)

Downgrade msal to version 1.32.0, as it works without the authentication error. This is a temporary workaround until the issue is resolved in a future release.

Reference:

Powered by issue-sentinel

@sdg002
Copy link
Author

sdg002 commented Apr 25, 2025

For now we have pinned our Azure python packages to get our mission critical processes up and running.

azure-keyvault-secrets==4.9.0
azure-identity==1.21.0
msal==1.32.0

@rayluo
Copy link
Collaborator

rayluo commented Apr 25, 2025

@sdg002 , thanks for reporting. We are working on a fix. You can try pip install https://github.com/AzureAD/microsoft-authentication-library-for-python/archive/refs/heads/support-arc.zip Shipped as 1.32.3

@rayluo rayluo changed the title msal 1.32.2 has broken our authentication from on-premise servers [Resolved in 1.32.3] msal 1.32.2 has broken our authentication from on-premise servers Apr 25, 2025
@rayluo rayluo added Fixed regression Behavior that worked in a previous release that no longer works in a newer release and removed needs attention untriaged labels Apr 25, 2025
@rayluo rayluo closed this as completed Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed Possible-Solution regression Behavior that worked in a previous release that no longer works in a newer release Similar-Issue
Projects
None yet
Development

No branches or pull requests

2 participants