How to set permissions at repository level

Tisha Sinha 20 Reputation points

Is it possible to set the visibility of different users at repo level.

For Example.

If there are 2 teams i.e., team1 and team2, in a project i.e., Action having 3 repos i.e, R1, R2, R3.

I want team1 to have visibility of only R1 and R2. and team2 having R1 and R3 visibility permission.

Note that the teams can have same users

I have tried this but when same users are added in different teams having different repo permission the user doesn't see any repo.

Hope to get a answer soon...

Azure Role-based access control
Azure Role-based access control
An Azure service that provides fine-grained access management for Azure resources, enabling you to grant users only the rights they need to perform their jobs.
714 questions
{count} votes

Accepted answer
  1. James Hamil 22,986 Reputation points Microsoft Employee

    Hi @Tisha Sinha , you can create custom roles and assign them to users or groups to manage access to specific repositories in your container registry.

    Here's how you can set repository-level permissions for your scenario using Azure RBAC:

    1. Create two custom roles, one for each team, with the appropriate permissions for the repositories they need access to. For example, create a custom role for team1 with permissions to R1 and R2, and a custom role for team2 with permissions to R1 and R3.
    2. Assign the custom roles to the respective teams. You can assign roles at the subscription, resource group, or individual repository level.
    3. When a user authenticates with their Azure AD credentials, they will only have access to the repositories specified in their assigned role. In your scenario, a user who is a member of both teams will have access to all three repositories if they have been assigned the appropriate roles.

    Please let me know if you have any questions and I can help you further.

    If this answer helps you please mark "Accept Answer" so other users can reference it.

    Thank you,


0 additional answers

Sort by: Most helpful