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

Use provided authority port when building the tenant discovery endpoint #484

Merged
merged 3 commits into from
Jun 29, 2022

Conversation

sarathys
Copy link
Contributor

@sarathys sarathys commented Jun 17, 2022

Add support for authority (STS) endpoint hosted on non-443 port. This allows Azure CLI to use STS and Graph hosted on different endpoints. e.g.

>  az cloud show -n DevEnv
{
  "endpoints": {
    "activeDirectory": "https://localhost:3001",
    "activeDirectoryDataLakeResourceId": "https://datalake.azs/",
    "activeDirectoryGraphResourceId": "https://localhost:3002/v1.0/",
    "activeDirectoryResourceId": "https://login.azs",
...
  },
  "isActive": false,
  "name": "DevEnv",
  "profile": "latest",
  "suffixes": {
   ...
  }
}

This change will allow such configuration for Azure CLI and users can use az login to use it.

See Azure/azure-cli#22553 for the error we get without this change.

msal/authority.py Outdated Show resolved Hide resolved
msal/authority.py Outdated Show resolved Hide resolved
Copy link

@aluty aluty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always adding port (:{}) will not cause any problems in default port 443 case?

@rayluo rayluo merged commit 5935f0b into AzureAD:dev Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants