-
Notifications
You must be signed in to change notification settings - Fork 344
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
[Bug] Incorrect authority in AuthResult using instance_aware #3637
Comments
Can repro. |
@bgavrilMS Thanks for Reproing. What's the ETA for this to be fixed ? |
@NakulSabharwal95 - correct me if I am wrong, but the scenario where you domain join the new account still fails right? |
@bgavrilMS I don't have a non-public domain joined machine, so I was not able to test domain joined scenario. |
Clarification. I can still repro the following issue:
Actual: the browser shows some "nonce malformed" error If however at step 3 you press "This app only", then you get a token, but the authority in the AuthResult is wrong. |
What happens if we don't press "This app only" instead to All Microsoft apps? Also, its a known issue that public domain joined device when logs into non-public account then it doesn't work correctly and shows nonce error. But I haven't been able to test it on non-public domain joined device I expect it may work correctly on it. |
I'm just saying that until this issue with the nonce is fixed via Windows update, this feature is unusable. |
@bgavrilMS Is "nonce malformed" issue reproducible on non-public domain joined account using an account belonging to same cloud? Also, handing of WAM |
Yes @NakulSabharwal95 - that is the fix in the attached PR. Adding those extra query params is not a supported scenario to get the multi-cloud feature working. |
@bgavrilMS Can you provide preview build of that PR? then I can test it on my machine. |
@NakulSabharwal95 - sent via Teams |
MSAL 4.47.0 has been released, This issue is now fixed. |
I used the below mentioned configuration and tried logging into a non-public cloud. I got logged in, successfully got access token as well, everything is correct Except Authority is not of respective cloud. It seems library is overriding the authority it gets in their result.
Also, when I enable instance_aware manually using query params it works fine except authority but when I use WithMultiCloudSupport(true) it doesn't work.
Which version of MSAL.NET are you using?
MSAL.NET 4.46.0
Platform
.NET Framework: 4.7
What authentication flow has the issue?
Is this a new or existing app?
The app is in production, I haven't upgraded MSAL, but started seeing this issue.
Repro
1.Use this configuration of WAM
2.Login using a non-public cloud account which is not added to your OS.
Expected behavior
Environment of respective cloud in AuthResult (account used is non-public).
Actual behavior
Got Public Environment in AuthResult but the account was non-public cloud.
Possible solution
Do not override the auth result, instead return the authority as it is at least for non-public cloud OR fix WithMultiCloudSupport(true) with WAM.
The text was updated successfully, but these errors were encountered: