-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix Azure Repos sign-in with Microsoft Accounts #148
Merged
Merged
Conversation
This file contains 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
mjcheetham
added
host:azure-repos
Specific to the Azure Repos (Azure DevOps, VSTS) host provider
auth:microsoft
Specific to Microsoft AAD/MSA authentication
labels
Jul 17, 2020
mjcheetham
requested review from
dscho,
derrickstolee,
jeffhostetler and
bgavrilMS
July 17, 2020 13:11
bgavrilMS
approved these changes
Jul 17, 2020
/azp trigger GCM-PR |
Command 'trigger' is not supported by Azure Pipelines. Supported commands
See additional documentation. |
/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
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.
I tested it on Windows, and it works! 🎉
The PR build was in fact green, but GitHub Checks API and Azure Pipelines was not having a good day... 😢 |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
auth:microsoft
Specific to Microsoft AAD/MSA authentication
host:azure-repos
Specific to the Azure Repos (Azure DevOps, VSTS) host provider
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