-
Notifications
You must be signed in to change notification settings - Fork 195
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
Client_id is case sensitive #304
Comments
Thanks for your detail issue report! That was helpful to help us repro the issue and investigate. We tend to not make any change in this case, though. And this is why.
The "offending" token is already printed on the console, in its decoded form. This has been helpful to lead you to raise this issue. If you mean you want the raw token to be printed, it is unlikely to give you the following insight. Here comes an example.
And, nope, there is no requirement saying that |
Tested with Azure CLI client ID in UPPER CASE and reproduced this issue. from msal import PublicClientApplication
app = PublicClientApplication(
"04B07795-8DDB-461A-BBEE-02F9E1BF7B46",
authority="https://login.microsoftonline.com/common")
token = app.acquire_token_interactive(["https://management.azure.com/.default"], prompt="login")
Perhaps AAD service should fail even earlier when the browser launches at For example, if I use a wrong client ID |
Indeed, ideally the server-side would block an uppercase client_id like it does to a misspelled client_id. But, at this point, it might not make this change. Regardless, the current MSAL behavior is correct to treat Empirically, the client_id was always created as all lowercase GUID, so, everything would be fine if apps just use the client_id in their original form. @SaarasM , where did you find your app's |
Thank you both for the quick response. I wasn't aware that the The data source was the Azure Sphere Public API Docs. I am on the team so will contact our docs team and ask them to fix this. Feel free to close this issue and thank you for all your help! |
Describe the bug
A clear and concise description of what the bug is.
If the client_id provided to the
PublicClientApplication
class is not lowercase the following exception is received:To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Ideally the token would be printed.
Failing that an error message that reminds the user that the client_id is case sensitive.
Failing that some documentation that the
client_id
should be lowercase.What you see instead
Paste the sample output, or add screenshots to help explain your problem.
Instead the following error is seen:
The MSAL Python version you are using
Paste the output of this
python -c "import msal; print(msal.__version__)"
1.8.0
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: