Call to authorize: all the documents indicate that I can supply "domain_hint" but it actually it must be "domainHint" #5479
Labels
answered
Question has received "first qualified response"
bug-unconfirmed
A reported bug that needs to be investigated and confirmed
documentation
Related to documentation.
msal-browser
Related to msal-browser package
public-client
Issues regarding PublicClientApplications
question
Customer is asking for a clarification, use case or information.
Uh oh!
There was an error while loading. Please reload this page.
Core Library
MSAL.js v2 (@azure/msal-browser)
Core Library Version
2.28.3
Wrapper Library
.NET Microsoft.Authentication.WebAssembly.Msal
Wrapper Library Version
7.0.0
Public or Confidential Client?
Public
Description
I tried to supply a domain_hint in calling from MSAL .NET library. It seems the .NET code is fine and passing the correct value to MSAL.js, so I think the issue is either in my understanding of MSAL.js or in the precise way I am passing the info in.
I got the following trace output on the call to login ("NavigateToLogin" in C# code), and it seems to call MSAL.js correctly. It looks like
signIn-Request
is correct, with the right domain_hint, but then the call to authorize results in a request without domain_hint in the query string.Would you expect a domain_hint in additionalRequestParameters to result in a domain_hint in the query string? If not, how do I make MSAL.js take the hint?
Below is the URI that it opens in a popup to start login--shouldn't I expect to see the domain hint in here?
https://login.microsoftonline.com/0c33cce8-883c-4ba5-b615-guidredacted/oauth2/v2.0/authorize?client_id=9e32b5ae-f519-4632-850e-guidredacted&scope=9e32b5ae-f519-4632-850e-guidredacted/user_impersonation openid profile offline_access&redirect_uri=https://localhost:5008/authentication/login-callback&client-request-id=62e3f911-01c6-48be-b4d9-guidredacted&response_mode=fragment&response_type=code&x-client-SKU=msal.js.browser&x-client-VER=2.28.3&client_info=1&code_challenge=rExM--OqtAlMstringRedactedfcOQ&code_challenge_method=S256&nonce=ab1b920b-4a3a-477b-8214-guidredacted&state=eyJpZstringRedactedstringRedactedstringRedactedstringRedactedstringRedactedstringRedacted34e7
When I change the above to
domainHint
instead ofdomain_hint
, it works. Can the documents be updated to suggest that? By this doc and this one and this answer, the additional parameter needed is said to bedomain_hint
. It seems like sometimes it needs to be one or the other and the distinction is not clear.Error Message
Shown above
Msal Logs
Shown above
MSAL Configuration
Relevant Code Snippets
Reproduction Steps
If necessary, I could create a demo app, but that is very time-consuming, and I think the issue is apparent from my description.
Expected Behavior
I'd expect MSAL.js to call authorize with a domain hint so that my call to Azure AD will result in the sign-in popup but automatically choose the user that matches the hint.
Instead, it seems like the
domain_hint
is ineffective and users are always prompted to "pick an account" .When I supply
domainHint
instead, it works--the user is not prompted to pick an account.Identity Provider
Azure AD / MSA
Browsers Affected (Select all that apply)
Chrome, Firefox
Regression
No response
Source
External (Customer)
The text was updated successfully, but these errors were encountered: