Skip to content

Fix Azure Repos sign-in with Microsoft Accounts - #148

Merged
mjcheetham merged 1 commit into
git-ecosystem:masterfrom
mjcheetham:msafix
Jul 17, 2020
Merged

Fix Azure Repos sign-in with Microsoft Accounts#148
mjcheetham merged 1 commit into
git-ecosystem:masterfrom
mjcheetham:msafix

Conversation

@mjcheetham

Copy link
Copy Markdown
Contributor

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

@mjcheetham mjcheetham added host:azure-repos Specific to the Azure Repos (Azure DevOps, VSTS) host provider auth:entra Specific to Microsoft Entra Authentication labels Jul 17, 2020
@dscho

dscho commented Jul 17, 2020

Copy link
Copy Markdown
Contributor

/azp trigger GCM-PR

@azure-pipelines

Copy link
Copy Markdown
Command 'trigger' is not supported by Azure Pipelines.

Supported commands
  • help:
    • Get descriptions, examples and documentation about supported commands
    • Example: help "command_name"
  • list:
    • List all pipelines for this repository using a comment.
    • Example: "list"
  • run:
    • Run all pipelines or specific pipelines for this repository using a comment. Use this command by itself to trigger all related pipelines, or specify specific pipelines to run.
    • Example: "run" or "run pipeline_name, pipeline_name, pipeline_name"
  • where:
    • Report back the Azure DevOps orgs that are related to this repository and org
    • Example: "where"

See additional documentation.

@dscho

dscho commented Jul 17, 2020

Copy link
Copy Markdown
Contributor

/azp run GCM-PR

@azure-pipelines

Copy link
Copy Markdown
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.

@dscho dscho left a comment

Copy link
Copy Markdown
Contributor

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! 🎉

@mjcheetham
mjcheetham merged commit 2b944be into git-ecosystem:master Jul 17, 2020
@mjcheetham
mjcheetham deleted the msafix branch July 17, 2020 14:03
@mjcheetham

Copy link
Copy Markdown
Contributor Author

The PR build was in fact green, but GitHub Checks API and Azure Pipelines was not having a good day... 😢
https://dev.azure.com/mseng/AzureDevOps/_build/results?buildId=12622663&view=results

@mjcheetham mjcheetham mentioned this pull request Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auth:entra Specific to Microsoft Entra Authentication host:azure-repos Specific to the Azure Repos (Azure DevOps, VSTS) host provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot sign in with MSA against MSA AzDO org

4 participants