0

i have a entra group X, i want to add them in repository and set the permission as admin access through API. and it should be visible in UI here com-project → Project Settings → Repositories → sample-project.

i am expecting the API to add them in repo and visible in UI

asked Jun 25, 2025 at 17:32

1 Answer 1

0

Adding Entra Group as Repository Administrator via API

API Endpoint:

POST https://dev.azure.com/{organization}/_apis/accesscontrolentries/2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87?api-version=7.1

Request Body:

{
 "token": "repoV2/{projectId}/{repositoryId}",
 "merge": true,
 "accessControlEntries": [
 {
 "descriptor": "aadgp.{entraGroupObjectId}",
 "allow": 8188,
 "deny": 0
 }
 ]
}

Key Details:

  • Security Namespace ID: 2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87 (Git repositories)

  • Token format: repoV2/{projectId}/{repositoryId}

  • Descriptor format: aadgp.{entraGroupObjectId}

  • Admin permissions value: 8188 (includes all repository admin rights)

Requirements:

  • PAT token with "Project and Team (read, write, & manage)" permissions

  • Entra group Object ID from Azure AD

  • Project and Repository GUIDs

Verification: After the API call, the group will appear in: Project Settings → Repositories → {repository-name} → Security tab with Administrator permissions.

The changes typically reflect in the UI within a few minutes.

answered Jun 26, 2025 at 13:04
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.