Fix Azure Repos sign-in with Microsoft Accounts - #148
Merged
Conversation
mjcheetham
requested review from
bgavrilMS,
derrickstolee,
dscho and
jeffhostetler
July 17, 2020 13:11
bgavrilMS
approved these changes
Jul 17, 2020
Contributor
|
/azp trigger GCM-PR |
|
Command 'trigger' is not supported by Azure Pipelines. Supported commands
See additional documentation. |
Contributor
|
/azp run GCM-PR |
|
No pipelines are associated with this pull request. |
Use the /organizations authority for MSA accounts with Azure DevOps/Repos. This is because we're using MSA pass-through, an internal Microsoft mechanism to support both MSA and 'work' (AAD) accounts with the same auth stacks. You should be able to use /common, but this doesn't work. At the same time we're using ADAL Obj-C on macOS rather than MSAL.NET like we do on Windows, and ADAL speaks to the "v1" AAD endpoints, which don't know the /organizations tenant :( For macOS we need to fudge the authority _back_ to /common for MSA accounts.
derrickstolee
approved these changes
Jul 17, 2020
dscho
approved these changes
Jul 17, 2020
dscho
left a comment
Contributor
There was a problem hiding this comment.
I tested it on Windows, and it works! 🎉
Contributor
Author
|
The PR build was in fact green, but GitHub Checks API and Azure Pipelines was not having a good day... 😢 |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use the /organizations authority for MSA accounts with Azure DevOps/Repos. This is because we're using MSA pass-through, an internal Microsoft mechanism to support both MSA and 'work' (AAD) accounts with the same auth stacks.
You should be able to use /common, but this doens't work. At the same time we're using ADAL Obj-C on macOS rather than MSAL.NET like we do on Windows, and ADAL speaks to the "v1" AAD endpoints, which don't know the /organizations tenant 😢
For macOS we need to fudge the authority back to /common for MSA accounts.
The "correct" fix here is to move from MSA pass-through, us our own client ID (#47) and drop the ADAL Obj-C component and add UI on .NET Core for MSAL.NET... all these things would take a long time to do.
Fixes #143