Privileged access is not working via API data showing null

107 Views Asked by At

I have a user with owner permission on subscription and I am trying to use

https://graph.microsoft.com/beta/privilegedAccess/azureResources/resources

the result is always null for a subscription. I have the privileged access permission for the user I am working with.

Result

@odata.context                                                 value
--------------                                                 -----
https://graph.microsoft.com/beta/$metadata#governanceResources {}   

Update: When I try to assign owner on a RG am able to fetch result

1

There are 1 best solutions below

4
On

If you assign the role for the user in Privileged Identity Management in the portal, make sure the Status of the assignment is Active, if it is Eligible, please update it to Active, otherwise the Owner role will not take effect, it will return null.

enter image description here

You could check it in the Privileged Identity Management -> Azure resources -> select your subscription -> Assignments -> search for your user account.

enter image description here

Another way, you could navigate to the subscription in the portal directly -> Access control (IAM) -> Add -> Add role assignment -> search for your user account and add it as Owner, it will also work. See this link.

enter image description here