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] Support "spa_accountId" response parameter from STS #3994

Closed
will-bartlett opened this issue Mar 8, 2023 · 2 comments · Fixed by #4020
Closed

[Feature Request] Support "spa_accountId" response parameter from STS #3994

will-bartlett opened this issue Mar 8, 2023 · 2 comments · Fixed by #4020

Comments

@will-bartlett
Copy link

will-bartlett commented Mar 8, 2023

Is your feature request related to a problem? Please describe.
Azure Portal is working on a feature (called the WebNativeBridge) which enables it to use OS single sign-in state. This feature initializes MSAL.JS with a parameter "accountId" which is a handle into the native operation system instead of the normal OAuth authorization code parameter. When Azure Portal uses this feature in its "hybrid SPA" implementation, the server returns this parameter to the confidential client in the field "spa_accountId" instead of the existing parameter "spa_code". MSAL.JS needs to use this parameter to initialize itself.

Describe the solution you'd like
Like AuthResult.SPA_CODE, expose AuthResult.SPA_ACCOUNTID.

Describe alternatives you've considered
Alternatively, expose AuthResult.AdditionalParameters, so we can access AuthResult.AdditionalParameters["spa_accountId"].

Another alternative considered - putting spa code and spa accountid in the same field - does not work. Both codes and accountids are opaque. MSAL.JS needs to know whether the opaque value used to initialize it is an authorization code or an accountId.

Additional context
Part of zod.

** Algorithm **

image

Note ^^ that MSAL.NET does not make /authorization calls, it just formats the URL and using WithExtraQueryParameters is sufficient here.

@bgavrilMS
Copy link
Member

CC @gladjohn and @jmprieur

@bgavrilMS bgavrilMS added this to the 4.52.0 milestone Mar 13, 2023
@bgavrilMS bgavrilMS self-assigned this Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants