我已为 Azure DevOps 创建了服务主体,并尝试通过 DevOps Pipeline 将新成员添加到 AzureAD 组。到目前为止,该组仅包含用户。以下是已经完成的操作:
- 我已在 Azure DevOps 中建立 ARM 服务链接连接。
- 我向服务主体授予了
Active Directory/App Registration/SP_name/Microsoft-Graph
中group.readwrite.all
的 API 权限 - 我已在 Azure DevOps 的 Azure CLI Shell 中运行该脚本:
az ad group member add --group XXX-YYY-groupname --member-id 111111-111-111-111-11111
DevOps 管道失败并显示消息:错误:没有足够的权限来完成操作。
在委托(delegate) DevOps 服务主体向我的群组添加成员时我缺少什么?
最佳答案
我相信您需要的权限是GroupMember.ReadWrite.All
。从这里link
:
Allows the app to list groups, read basic properties, read and update the membership of the groups the signed-in user has access to. Group properties and owners cannot be updated and groups cannot be deleted.
关于Azure 服务主体 - 将成员添加到 AD 组的权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67333652/