1

(Real need: I want to set up a customized-to-my-needs container for development. I have the dockerfile but my impression is that I need to go through ACR. So:)

I'm logged in to Azure both with the CLI (az login) and with the Azure Portal in a browser. Following this Learn tutorial I set up an ACR but the tutorial fails for me at step az acr --login <acrname> with:

Unable to get AAD authorization tokens with message: 2023-12-06 19:20:09.434724 An error occurred: CONNECTIVITY_REFRESH_TOKEN_ERROR
Access to registry 'foobar.azurecr.io' was denied. Response code: 401. Please try running 'az login' again to refresh permissions.
Unable to get admin user credentials with message: Admin user is disabled.

I then get a User/Pass prompt but when I put in my Azure login credentials, that fails with unauthorized: Application not registered with AAD.

This is not a "refresh permissions" issue, as I can az login immediately prior to this command and the login succeeds and allows me to do other CLI stuff. In Azure Portal, when I open the ACR and look at "Access Control"|"View my access" I have "Classic Administrators (1) / Service Administrator".

I get the same result using the CLI from both a WSL-based terminal and a Powershell-based terminal.

Do I really need to set up AAD to access ACR, which I only need to serve a single image from? Is there no "just choose compute and upload a Dockerfile" workflow?

1 Answer 1

0

This issue, for me, was caused by not assigning myself the AcrPush role in the azure portal (even though I created the test registry within my own subscription so I'm a contributor by default \o/).

However, for your use-case you can probably just enable the admin user (a tick box inside the 'access keys' blade of your azure container registry page in the azure portal) to make the error go away. Just be aware of what you're doing if you do this!

Further detail can be found in this existing answer over in SO: https://stackoverflow.com/a/67599570/747633

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.