-
Notifications
You must be signed in to change notification settings - Fork 242
Add optional login and domain hints to SignIn method #3330
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
Conversation
tests/Microsoft.Identity.Web.UI.Test/Microsoft.Identity.Web.UI.Test.csproj
Outdated
Show resolved
Hide resolved
tests/Microsoft.Identity.Web.UI.Test/Microsoft.Identity.Web.UI.Test.csproj
Outdated
Show resolved
Hide resolved
src/Microsoft.Identity.Web.UI/Areas/MicrosoftIdentity/Controllers/AccountController.cs
Outdated
Show resolved
Hide resolved
….Test.csproj Co-authored-by: Westin Musser <[email protected]>
….Test.csproj Co-authored-by: Westin Musser <[email protected]>
…ers/AccountController.cs Co-authored-by: Westin Musser <[email protected]>
src/Microsoft.Identity.Web.UI/Areas/MicrosoftIdentity/Controllers/AccountController.cs
Outdated
Show resolved
Hide resolved
…ers/AccountController.cs Co-authored-by: Westin Musser <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds optional login and domain hint parameters to the SignIn method to improve the user experience by allowing hints for email and domain during sign-in.
- Updated AccountController.SignIn to accept optional loginHint and domainHint parameters.
- Updated Public API definitions to reflect the new signature while removing the old one.
- Added and updated tests to ensure the new behavior works both with and without the hints.
Reviewed Changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/Microsoft.Identity.Web.UI.Test/Areas/MicrosoftIdentity/Controllers/AccountControllerTests.cs | Added tests covering scenarios with and without login and domain hints. |
| src/Microsoft.Identity.Web.UI/PublicAPI.Unshipped.txt | Added new API signature including loginHint and domainHint parameters. |
| src/Microsoft.Identity.Web.UI/PublicAPI.Shipped.txt | Removed the previous overload of SignIn without the new parameters. |
| src/Microsoft.Identity.Web.UI/Areas/MicrosoftIdentity/Controllers/AccountController.cs | Updated the SignIn method to process optional loginHint and domainHint parameters. |
Files not reviewed (2)
- Microsoft.Identity.Web.sln: Language not supported
- tests/Microsoft.Identity.Web.UI.Test/Microsoft.Identity.Web.UI.Test.csproj: Language not supported
…zureAD/microsoft-identity-web into ssathe-3244-add-optional-hints
|
@jennyf19 I have performed manual E2ETesting as well. Please find the screenshot attached. The sample is WebAppCallsMicrosoftGraph |
What code did you use to set the login hint? |
|
@jmprieur I did not use any tool. Postman is what I usually used to use. But Postman is blocked. Hence just using simple get query. Here is something that I used: https://localhost:5001/MicrosoftIdentity/Account/SignIn?redirectUri=/&[email protected]&domainHint=msidlab4.onmicrosoft.com |
|
@jmprieur I have added the sample code at the following link: https://github.com/AzureAD/microsoft-identity-web/wiki/Customization#customization-to-sign-in-experience . Can you please check and approve the PR if everything looks good? |
Thanks, however, what would be the controller view? do you have the full sample |
jmprieur
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @saurabhsathe-ms
...Microsoft.Identity.Web.UI.Test/Areas/MicrosoftIdentity/Controllers/AccountControllerTests.cs
Show resolved
Hide resolved
I have provided a sample view @jmprieur |
|
Hi all, am I correct that this feature is not yet released? |

Issue #3244 add optional login and domain hints to SingIn method of Id web
Feature Request - Add optional hints to the sign in method
Description
This PR adds optional hints to the sign-in method for better user experience. User requested feature so that they can pass domain and login hint as email. These parameters are passed as an option and SignIn method works normally if these options removed.
Fixes #3244