I have a service principal account that I use to automate compute and resource management objects without issue. What I can't seem to interact with is the Azure AD side of the house. I am getting an
"azure.graphrbac.models.graph_error.GraphErrorException: Insufficient privileges to complete the operation"
I'm not sure where to go to add the correct privileges for this. Currently testing the following just to see if I can at least list users:
graph_credentials = ServicePrincipalCredentials(
client_id = CLIENT,
secret = KEY,
tenant = TENANT_ID,
resource = 'https://graph.windows.net'
graphrbac_client = GraphRbacManagementClient(graph_credentials, TENANT_ID)
for item in graphrbac_client.groups.list():
print(item)
I've checked resources online and the SDK documentation, it looks like I'm doing it correctly. I'm sure it is something simple. I've also tried to use UserPassCredentials() but I get other errors. Don't want to use user creds for this anyway.


