az login error in interactive mode #30810
Labels
Account
az login/account
Auto-Assign
Auto assign by bot
Auto-Resolve
Auto resolve by bot
Azure CLI Team
The command of the issue is owned by Azure CLI team
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Possible-Solution
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Similar-Issue
Milestone
Describe the bug
when run this command:
az login --tenant vgc.partner.onmschina.cn
A web browser has been opened at https://login.partner.microsoftonline.cn/a12a82ff-eb68-4d6d-b3c7-c4fb2d2220e5/oauth2/v2.0/authorize. Please continue the login in the web browser. If no web browser is available or if the web browser fails to open, use device code flow with
az login --use-device-code
.then the interactive pop up window of microsoft edge showed up and then I input my azure account for this tenant to login, it looks authentication verified successfully, but finally it told me that authentication failed with the following message:
AADSTS500011: The resource principal named https://management.core.windows.net/ was not found in the tenant named VGC. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You might have sent your authentication request to the wrong tenant. Trace ID: f19a3214-aaac-4396-bd0b-f19506925a01 Correlation ID: 596ef644-de7c-4adf-b839-0c25b846cd7b Timestamp: 2025-02-12 09:53:39Z
Related command
az login --tenant vgc.partner.onmschina.cn
Errors
Authentication failed
invalid_resource: AADSTS500011: The resource principal named https://management.core.windows.net/ was not found in the tenant named VGC. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You might have sent your authentication request to the wrong tenant. Trace ID: 33290a63-148d-49bb-9b1b-71dd408e2901 Correlation ID: 229a5269-8e56-49e5-aba9-d47a8a7e92f5 Timestamp: 2025-02-12 09:50:16Z. (https://login.partner.microsoftonline.cn/error?code=500011)
Issue script & Debug output
az login --tenant vgc.partner.onmschina.cn
A web browser has been opened at https://login.partner.microsoftonline.cn/a12a82ff-eb68-4d6d-b3c7-c4fb2d2220e5/oauth2/v2.0/authorize. Please continue the login in the web browser. If no web browser is available or if the web browser fails to open, use device code flow with
az login --use-device-code
.AADSTS500011: The resource principal named https://management.core.windows.net/ was not found in the tenant named VGC. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You might have sent your authentication request to the wrong tenant. Trace ID: 33290a63-148d-49bb-9b1b-71dd408e2901 Correlation ID: 229a5269-8e56-49e5-aba9-d47a8a7e92f5 Timestamp: 2025-02-12 09:50:16Z
Authentication failed
invalid_resource: AADSTS500011: The resource principal named https://management.core.windows.net/ was not found in the tenant named VGC. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You might have sent your authentication request to the wrong tenant. Trace ID: 33290a63-148d-49bb-9b1b-71dd408e2901 Correlation ID: 229a5269-8e56-49e5-aba9-d47a8a7e92f5 Timestamp: 2025-02-12 09:50:16Z. (https://login.partner.microsoftonline.cn/error?code=500011)
Expected behavior
it can be login successfully to use azure cli
Environment Summary
azure-cli 2.44.1 *
core 2.44.1 *
telemetry 1.0.8 *
Dependencies:
msal 1.20.0
azure-mgmt-resource 21.1.0b1
Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\gw029di.azure\cliextensions'
Python (Windows) 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:37:59) [MSC v.1933 32 bit (Intel)]
Legal docs and information: aka.ms/AzureCliLegal
Additional context
No response
The text was updated successfully, but these errors were encountered: