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

PublicClientApplicationBuilder.CreateWithApplicationOptions does not respect the audience #969

Closed
jmprieur opened this issue Mar 13, 2019 · 3 comments
Assignees
Labels
Milestone

Comments

@jmprieur
Copy link
Contributor

jmprieur commented Mar 13, 2019

Which Version of MSAL are you using ?
MSAL 3.0.0-preview

Platform
Any (for instance desktop)

What authentication flow has the issue?
Any (this is app config)

Other? - please describe;

Repro

PublicClientApplicationOptions options = new PublicClientApplicationOptions();
options.AzureCloudInstance = AzureCloudInstance.AzurePublic;
options.AadAuthorityAudience = AadAuthorityAudience.AzureAdMultipleOrgs;
options.ClientId = "ebe2ab4d-12b3-4446-8480-5c3828d04c50";

var app = PublicClientApplicationBuilder.CreateWithApplicationOptions(options)
                                                 .Build();
string authority = app.Authority;

Expected behavior
authority should be https://login.microsoftonline.com/organizations/

Actual behavior
whereas it is https://login.microsoftonline.com/common/

Note that
If we override the options with
.WithAuthority(options.AzureCloudInstance, AadAuthorityAudience.AzureAdMultipleOrgs), this works correctly ...

Important
When this bug is fixed, please remove the work around in the following samples:

@jmprieur
Copy link
Contributor Author

@jmprieur jmprieur changed the title PublicClientApplicationBuilder.CreateWithApplicationOptions does not repect the audience PublicClientApplicationBuilder.CreateWithApplicationOptions does not respect the audience Mar 13, 2019
@jmprieur jmprieur added the v3 label Mar 13, 2019
@henrik-me
Copy link
Contributor

seems like we are missing a test :)

@MarkZuber
Copy link
Contributor

#982

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