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

Unable to authenticate within the scope of an Azure Container Registry #30445

Open
andrei-dascalu opened this issue Nov 29, 2024 · 4 comments
Open
Assignees
Labels
Account az login/account Auto-Assign Auto assign by bot Container Registry az acr customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention This issue is responsible by Azure service team. Similar-Issue
Milestone

Comments

@andrei-dascalu
Copy link

andrei-dascalu commented Nov 29, 2024

Describe the bug

Given the command

az login --scope https://<my ACR name>.azurecr.io/.default --tenant <tenant id>

I receive the following error after performing the browser login:

Authentication failed

invalid_resource: AADSTS500011: The resource principal named https://<my ACR name>.azurecr.io was not found in the tenant named <my tenant name>. 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: c3ce5dd8-5846-48bd-b973-7d37aa7f8300 Correlation ID: a9a9d4e9-e675-43a2-96ba-302115800e59 Timestamp: 2024-11-29 06:54:41Z. (https://login.microsoftonline.com/error?code=500011)

You can log an issue at [Azure CLI GitHub Repository](https://github.com/azure/azure-cli/issues) and we will assist you in resolving it.

The ACR name exists and it's part of the tenant whose id I am supplying.

Related command

az login --scope https://.azurecr.io/.default --tenant

Errors

Authentication failed

invalid_resource: AADSTS500011: The resource principal named https://<my ACR name>.azurecr.io was not found in the tenant named <my tenant name>. 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: c3ce5dd8-5846-48bd-b973-7d37aa7f8300 Correlation ID: a9a9d4e9-e675-43a2-96ba-302115800e59 Timestamp: 2024-11-29 06:54:41Z. (https://login.microsoftonline.com/error?code=500011)

You can log an issue at [Azure CLI GitHub Repository](https://github.com/azure/azure-cli/issues) and we will assist you in resolving it.

Issue script & Debug output

cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x1026da5c0>]
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 3.301 seconds (init: 0.123, invoke: 3.178)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 4294 in cache file under /Users/adascalu/.azure/telemetry/20241129090219906
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/opt/homebrew/Cellar/azure-cli/2.67.0/libexec/bin/python /opt/homebrew/Cellar/azure-cli/2.67.0/libexec/lib/python3.12/site-packages/azure/cli/telemetry/__init__.py /Users/adascalu/.azure /Users/adascalu/.azure/telemetry/20241129090219906"
telemetry.process: Return from creating process 63658
telemetry.main: Finish creating telemetry upload process.

Expected behavior

successful login

Environment Summary

azure-cli 2.67.0

core 2.67.0
telemetry 1.1.0

Extensions:
account 0.2.5
alb 1.0.0
storage-preview 1.0.0b1

Dependencies:
msal 1.31.0
azure-mgmt-resource 23.1.1

Python location '/opt/homebrew/Cellar/azure-cli/2.67.0/libexec/bin/python'
Extensions directory '/Users/adascalu/.azure/cliextensions'

Python (Darwin) 3.12.7 (main, Oct 1 2024, 02:05:46) [Clang 16.0.0 (clang-1600.0.26.3)]

Additional context

No response

@andrei-dascalu andrei-dascalu added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Nov 29, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. Auto-Assign Auto assign by bot Account az login/account labels Nov 29, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added Azure CLI Team The command of the issue is owned by Azure CLI team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Nov 29, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented Nov 29, 2024

Thank you for opening this issue, we will look into it.

Copy link

Here are some similar issues that might help you. Please check if they can solve your problem.

@yonzhan yonzhan removed the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Nov 29, 2024
@yonzhan yonzhan added this to the Backlog milestone Nov 29, 2024
@jiasli
Copy link
Member

jiasli commented Nov 29, 2024

AADSTS500011 is returned by Microsoft Entra ID service, not Azure CLI.

@andrei-dascalu, are you following any documentation or did you receive any error message that tells you to run az login --scope https://<my ACR name>.azurecr.io/.default --tenant <tenant id>?

@jiasli jiasli added Service Attention This issue is responsible by Azure service team. Container Registry az acr labels Nov 29, 2024
Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @toddysm, @luisdlp, @northtyphoon, @terencet-dev.

@yonzhan yonzhan removed the Azure CLI Team The command of the issue is owned by Azure CLI team label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Account az login/account Auto-Assign Auto assign by bot Container Registry az acr customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention This issue is responsible by Azure service team. Similar-Issue
Projects
None yet
Development

No branches or pull requests

3 participants