我有一个服务主体,VSTS 使用它来运行 Azure Powershell 脚本。我试图调用的命令是Get-AzureRmRoleAssignment
. 我收到以下错误消息
"Exception": {
"Request": {
"Method": "POST",
"RequestUri": "https://graph.windows.net/********/getObjectsByObjectIds?api-version=1.6",
"Properties": "System.Collections.Generic.Dictionary`2[System.String,System.Object]",
"Headers": "System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.IEnumerable`1[System.String]]"
},
"Response": {
"StatusCode": 403,
"ReasonPhrase": "Forbidden",
"Content": {
"odata.error": {
"code": "Authorization_RequestDenied",
"message": {
"lang": "en",
"value": "Insufficient privileges to complete the operation."
}
}
},
"Headers": "System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.IEnumerable`1[System.String]]"
}
}
我已验证服务主体具有角色分配的读取权限。