How to Allow Customers to Access Azure Container Registry from Another Tenant?

xdf1038 20 Reputation points
2024-12-09T13:34:09.6166667+00:00

I have an Azure Container Registry (ACR) that is private where I push Docker images for our customers.

The customers have their own Azure accounts, and I want to allow them to only pull images from the ACR in our Azure account.

How can this be done in such a way that every customer has their own set of credentials to access our ACR?

Azure Container Registry
Azure Container Registry
An Azure service that provides a registry of Docker and Open Container Initiative images.
468 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,096 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sai Krishna Katakam 1,510 Reputation points Microsoft Vendor
    2024-12-09T21:53:31.29+00:00

    Hi xdf1038,

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    To allow customers from another Azure tenant to access your private Azure Container Registry (ACR) with their own credentials:

    Use the Azure CLI to create a service principal and assign it the AcrPull role for your ACR. Example:

    az ad sp create-for-rbac --name "customer-sp" --role "AcrPull" \
        --scopes /subscriptions/<YourSubscriptionId>/resourceGroups/<YourResourceGroup>/providers/Microsoft.ContainerRegistry/registries/<YourACRName>
    
    
    

    Share the appId, password, and tenant securely with the customer

    The customer logs in using the provided credentials:

    az login --service-principal -u <appId> -p <password> --tenant <tenant>
    az acr login --name <YourACRName>
    docker pull <YourACRName>.azurecr.io/<repository>:<tag>
    

    For more information, please refer to below documentations:
    Create a token with repository-scoped permissions
    Authenticate with an Azure container registry

    If an answer has been helpful, please consider accept the answer and "Upvote" to help increase visibility of this question for other members of the Microsoft Q&A community. 

    User's image


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.