Open db0 opened 1 day ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AshishGargMicrosoft @darshanhs90.
Update. It seems this might be a case of wrong error.
Trying to use the API directly with just scope
/subscriptions/00000000-0000-0000-0000-42c2f52c69f8
Is actually returning results. So somehow the scope I'm passing is returning an API version error instead of something more appropriate.
OK I managed to trace that this is a case of a malformed scope. Passing a scope which doesn't exist like the one I sent
/subscriptions/00000000-0000-0000-0000-42c2f52c69f8/resourceGroups/rsg-resourcegroup-001/microsoft.compute/virtualmachines/VMNAME
returns a missing API.
However the correct scope
/subscriptions/00000000-0000-0000-0000-42c2f52c69f8/resourceGroups/rsg-resourcegroup-001/providers/microsoft.compute/virtualmachines/VMNAME
Works
Thanks for the feedback, we’ll investigate asap.
The method I'm trying to use is documented here:
https://learn.microsoft.com/en-in/python/api/azure-mgmt-authorization/azure.mgmt.authorization.v2022_04_01.operations.roleassignmentsoperations?view=azure-python#azure-mgmt-authorization-v2022-04-01-operations-roleassignmentsoperations-list-for-scope
When trying to use it, once received this exception:
Using a different API version results in a missing endpoint exception.
The same can be replicated directly from the azure API here: https://learn.microsoft.com/en-us/rest/api/authorization/role-definitions/list
So it seems that the Azure API removed this endpoint.
I'm using version 4.0.0 of azure-mgmt-authorization on Ubuntu.
The code I'm using for reference is
And the vm_id I'm sending is like
and the authorization_client is