Azure DevOps API管理变量组的安全ACL

时间:2020-01-16 20:34:03

标签: azure-devops

是否可以通过Azure DevOps中的API管理变量组的安全ACL?

在文档中找不到任何内容

1 个答案:

答案 0 :(得分:1)

是否可以通过API中的API管理变量组的安全ACL Azure DevOps?

当然可以!

在天蓝色的部队中,变量组namespace namelibrary。并且命名空间ID B7E84409-6553-448A-BBB2-AF228E07CBEB

尽管我们没有对此进行记录,但是您可以通过 F12 来捕获它。只需单击安全性,然后您就会在网络中看到它。变量组中的token也已列出。


了解了变量组的namespace idtokenlibrary/{project id})之后,现在您可以使用以下ACL管理文档:Set Access Control Lists

POST https://dev.azure.com/{organization}/_apis/accesscontrollists/{securityNamespaceId}?api-version=5.1

"value": [
    {
      "inheritPermissions": true,
      "token": "Library/{project id}",
      "acesDictionary": {
        "Microsoft.TeamFoundation.Identity;S-1-9-1551374245-1204400969-2402986413-2179408616-0-0-0-0-1": {
          "descriptor": "Microsoft.TeamFoundation.Identity;S-1-9-1551374245-1204400969-2402986413-2179408616-0-0-0-0-1",
          "allow": 31,
          "deny": 0
        }
      }
    }
]