最佳答案
您可以使用User Entitlements - Add来做到这一点休息API:
POST https://vsaex.dev.azure.com/{organization}/_apis/userentitlements?api-version=5.1-preview.2
json 正文示例:
{
"accessLevel": {
"accountLicenseType": "express"
},
"extensions": [
{
"id": "ms.feed"
}
],
"user": {
"principalName": "<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a1cfc4d6d4d2c4d3e1c7c0c3d3c8cac0cc8fc2cecc" rel="noreferrer noopener nofollow">[email protected]</a>",
"subjectKind": "user"
},
"projectEntitlements": [
{
"group": {
"groupType": "projectContributor"
},
"projectRef": {
"id": "e5943a98-a842-4001-bd3b-06e756a7dfac"
}
}
]
}
关于azure - 如何以编程方式将 Azure AD 用户添加到 Azure DevOps 组织,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58709818/