Skip to content
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

domain_hint Not Working #799

Closed
1 of 7 tasks
myokeeh opened this issue Jan 18, 2019 · 13 comments
Closed
1 of 7 tasks

domain_hint Not Working #799

myokeeh opened this issue Jan 18, 2019 · 13 comments
Assignees
Labels
Milestone

Comments

@myokeeh
Copy link

myokeeh commented Jan 18, 2019

Which Version of MSAL are you using ?
2.7.0

Which platform has the issue?
UWP Desktop

What authentication flow has the issue?

  • Desktop / Mobile
    • Interactive
    • Integrated Windows Auth
    • Username Password
    • Device code flow (browserless)
  • Web App
    • Authorization code
    • OBO
  • Web API
    • OBO

Repro

MSAL version (DOES NOT show customized login):

await pca.AcquireTokenAsync(scopes, user, UIBehavior.ForceLogin, "domain_hint=mydomain.com");

ADAL version (shows customized login):

await ac.AcquireTokenAsync(resourceId, clientId,
                                    new Uri(redirectUri),
                                    new PlatformParameters(PromptBehavior.Always, false),
                                    UserIdentifier.AnyUser,
                                    "domain_hint=mydomain.com");

Expected behavior
Expecting to have our customized login for mydomain.com and password hint text shown like it currently does for our ADAL version.

Actual behavior
It doesn't show the customized login configured as it does on ADAL.

@jmprieur
Copy link
Contributor

@MarkZuber @henrik-me didn't you say this week that extraQueryParameters were not sent to the STS in MSAL 2.x ?
This will be fixed in MSAL 3.x.

@jmprieur jmprieur added this to the 3.0 milestone Jan 19, 2019
@MarkZuber
Copy link
Contributor

Verified this is not being sent on 2.7.0. This is fixed in our dev3x branch as part of our upcoming 3.x release. We don't have locked down timelines for a 3.x release but it should be within the next two weeks. is this blocking you @myokeeh or can you wait for our 3.x release?

@myokeeh
Copy link
Author

myokeeh commented Jan 23, 2019 via email

@MarkZuber
Copy link
Contributor

Thanks for the quick reply @myokeeh . Keep an eye out for announcements of our 3.x release.

@jmprieur
Copy link
Contributor

jmprieur commented Feb 8, 2019

Fixed in 3.x (with the new builder API)

@jennyf19
Copy link
Collaborator

Fixed in MSAL 3.0.0-preview release

@myokeeh
Copy link
Author

myokeeh commented Mar 11, 2019

@jennyf19 testing this out now. Is this syntax correct? It doesn't seem to show me the email textbox hint nor does it show our company branding.

 IPublicClientApplication pca = PublicClientApplicationBuilder.Create(clientId)
                                        .WithRedirectUri(redirectUri)
                                        .WithLogging(Log, Microsoft.Identity.Client.LogLevel.Info, enablePiiLogging: true, enableDefaultPlatformLogging: true)
                                        .WithExtraQueryParameters(new Dictionary<string, string>() { { "domain_hint", "mydomain.com" } })
                                        .Build();

@jmprieur
Copy link
Contributor

@myokeeh : which authority did you use?
Can you please try .WithExtraQueryParameters(new Dictionary<string, string>() { { "domain_hint", "orgnaizations" } })

@myokeeh
Copy link
Author

myokeeh commented Mar 12, 2019

@jmprieur authority is https://login.microsoftonline.com/{tenant_id}

I tried "organizations" per your suggestion, but it doesn't display company branding as expected.

@myokeeh
Copy link
Author

myokeeh commented Mar 12, 2019

@jmprieur actually, this seems to work. I didn't have .WithAuthority(authority)

 IPublicClientApplication pca = PublicClientApplicationBuilder.Create(clientId)
	.WithRedirectUri(redirectUri)
	.WithAuthority(authority)
	.WithLogging(Log, Microsoft.Identity.Client.LogLevel.Info, enablePiiLogging: true, enableDefaultPlatformLogging: true)
	.WithExtraQueryParameters(new Dictionary<string, string>() { { "domain_hint", "domain.com" } })
	.Build();

@myokeeh
Copy link
Author

myokeeh commented Mar 12, 2019

@jmprieur I took out the whole .WithExtraQueryParameters() line and it still seems to work. I don't even need it then?

@jmprieur
Copy link
Contributor

oh, that's new to me @myokeeh ; but the service has probably improved.
I'll check and update the doc.

do I understand that your problem is solved.

@myokeeh
Copy link
Author

myokeeh commented Mar 12, 2019

Got it. Yes, solved. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants