Azure / Azure/azure-cli

Device code login in Azure China Cloud returns incorrect link

Open
#32,926 4 comments 0 reactions 2 assignees Claimed by @ReaNAiveD View on GitHub
Account act-identity-squad Auto-Assign Auto-Resolve Azure CLI Team customer-reported Login question
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

az cloud set --name AzureChinaCloud
az login --use-device-code
To sign in, use a web browser to open the page **https://login.microsoftonline.cn/device** and enter the code ECMGW7WGV to authenticate.

the returned url https://login.microsoftonline.cn/device is incorrect, the correct url should be https://login.partner.microsoftonline.cn/device

### Related command

az cloud set --name AzureChinaCloud
az login --use-device-code

### Errors

https://login.microsoftonline.cn/device is an incorrect url

### Issue script & Debug output

na

### Expected behavior

return https://login.partner.microsoftonline.cn/device or https://microsoft.com/deviceloginchina

### Environment Summary

azure-cli 2.76.0 *

core 2.76.0 *
telemetry 1.1.0

Dependencies:
msal 1.33.0b1
azure-mgmt-resource 23.3.0

### Additional context

_No response_

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.