Search code examples
azure-devops

Container registry not listed when creating service connection


I have created a Azure Container Registry in my Azure subscription and wanted to use Azure Devops to build and push my containers. I am trying to create a service connection however when selecting my subscription the screen states "No registries found"

I also tried to create a pipeline using the Docker (Build and push an image to ACR) and this screen also cannot find my registry.

The registry exists and was created as a "Basic" SKU. I have tried other SKUs as well with no luck.

Any ideas of what I can do to be able to select my registry in Devops?


Solution

  • This could be caused by an expired token. Generally, we can try below ways to get it work (force refresh the token).

    • Go to Azure DevOps user profile page and switch to another directory, and then switch it back again. During the operation, it will force you to sign out and sign in again. Thus, it will refresh the token from AAD. If you have multiple directories here, then please do the same actions one by one, and then switch it back to the original directory (AAD) which you Azure DevOps organization needs to be backed to. After that try it again

    • Go to the affected ACR from Azure portal, then disable and re-enable admin account. (Click Update -> Enable/Disable the “Admin user” -> Save -> Disable/Enable the “Admin user” again -> Save). After that refresh the DevOps page and check if it works now. enter image description here