Azure / Azure/azure-cli

Document core.allow_broker=true and the AAD Broker plugin is not supported for non-commercial clouds

Open
#25,967 2 comments 0 reactions 1 assignee Claimed by @jiasli View on GitHub
AAD Account act-codegen-extensibility-squad act-identity-squad Auto-Assign Azure CLI Team Configure customer-reported feature-request
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

> ### `az feedback` auto-generates most of the information requested below, as of CLI version 2.0.62

**Related command**
az cloud set --name AzureUSGovernment
az config set core.allow_broker=true
az login

**Describe the bug**
If the cloud is set to any other cloud besides the default commercial cloud the AAD Broker plugin will fail to authenticate with the message below during login. The error is not intuitive indicating that the issue is usage of the AAD broker plugin.

Request Id: xyz
Correlation Id: xyz
Timestamp: 2023-03-28T15:14:12Z
Message: AADSTS50011: The redirect URI 'ms-appx-web://Microsoft.AAD.BrokerPlugin/04b07795-8ddb-461a-bbee-02f9e1bf7b46' specified in the request does not match the redirect URIs configured for the application '04b07795-8ddb-461a-bbee-02f9e1bf7b46'. Make sure the redirect URI sent in the request matches one added to your application in the Azure portal. Navigate to https://aka.ms/redirectUriMismatchError to learn more about how to fix this.

![image](https://user-images.githubusercontent.com/18233035/228284829-b0a9996d-9589-4205-abcd-9e45a778d34a.png)

![image](https://user-images.githubusercontent.com/18233035/228286261-80856f0e-0203-4de7-9efe-b9e6ddc2a42c.png)

**To Reproduce**
Use the following commands to try and login from a GCC High tenant.

az cloud set --name AzureUSGovernment
az config set core.allow_broker=true
az login

To mitigate, you need to disable the Broker using az config set core.allow_broker=false

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.