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

[Feature Request] Add an option to bypass User Discovery when using UsernamePasswordParameters with acquireToken #834

Open
fume opened this issue Jul 3, 2024 · 0 comments
Labels
Enhancement A request or suggestion to improve some aspect of the library public-client For questions/issues related to public client apps

Comments

@fume
Copy link

fume commented Jul 3, 2024

MSAL client type

Public

Problem Statement

When executing the acquireToken on the PublicClientApplication with a UsernamePasswordParameters object, a user discovery is made to understand if the user is a federated one or not. In case the user is federated, then a WSTrust request is made to obtain a SAML1.1 token which is then exchanged with a JWT via Entra ID.

Since a while, Entra ID supports (but discourages) the ROPC flow for Federated user directly against Entra ID:
image

If you have everything setup on Entra ID, MSAL will still not do ROPC against Entra ID since it makes decision based on the user discovery, so based on the username in the UsernamePasswordParameters object.

Proposed solution

Add a parameter to tell MSAL to bypass the User Discovery and directly make the ROPC request against the configured authority regardless of the fact the user is federated or not.

Alternatives

As of now the only alternative is to use a cloud-only (non-federated) user.

cc: @Avery-Dunn

@fume fume added needs attention Automatically used when an issue is created through an issue template untriaged Automatically used when an issue is created through an issue template labels Jul 3, 2024
@Avery-Dunn Avery-Dunn added Enhancement A request or suggestion to improve some aspect of the library public-client For questions/issues related to public client apps and removed needs attention Automatically used when an issue is created through an issue template untriaged Automatically used when an issue is created through an issue template labels Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement A request or suggestion to improve some aspect of the library public-client For questions/issues related to public client apps
Projects
None yet
Development

No branches or pull requests

2 participants