My organisation is connected to Azure AD.
I'd like to add AD users to my Azure DevOps organisation with C# or via Microsoft REST/Graph API.
You can do it with User Entitlements - Add Rest API:
POST https://vsaex.dev.azure.com/{organization}/_apis/userentitlements?api-version=5.1-preview.2
Example of the json body:
{
"accessLevel": {
"accountLicenseType": "express"
},
"extensions": [
{
"id": "ms.feed"
}
],
"user": {
"principalName": "[email protected]",
"subjectKind": "user"
},
"projectEntitlements": [
{
"group": {
"groupType": "projectContributor"
},
"projectRef": {
"id": "e5943a98-a842-4001-bd3b-06e756a7dfac"
}
}
]
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With