-
Notifications
You must be signed in to change notification settings - Fork 235
Fix Instance/Tenant Parsing for V2 Authority #2954
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
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 @jackj-msft
Do you have repro steps for that bug (end to end repro steps)?
@jackj-msft is there a specific version which is having the issue? |
If you specify any outbound policy that uses an AppToken AND a v2 authority endpoint (either inferred by MISE or specified)
I've been using the latest 1.27 of the Microsoft.Identity.ServiceEssentials.AspNetCore metapackage. |
Fix Instance/Tenant Parsing for V2 Authority
Summary of the changes (Less than 80 chars)
Fix the tenant parsing in MergedOptions for V2 authority endpoints.
Description
Currently
ParseAuthorityIfNecessary
assumes the authority to be formatted as{Instance}/{Tenant}
.With the introduction of v2.0 authority endpoints, this breaks the parsing of the authority.
i.e. given the authority of
https://testinstance/tenant123/v2.0
The existing method will return the following:
What we expect is the following:
Assumptions made:
https://
(or a prefix longer than 8 characters){Instance}/{Tenant}/{Version}
with the version being optional