I have a service principal that is used by VSTS to run an Azure Powershell script. The command i'm trying to call is Get-AzureRmRoleAssignment
. I'm getting the following error message
"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]]"
}
}
I've verified that the service principal has read access for role assignment.