Reputation: 361
What API should I use to check if a specific user is granted a policy?
Example: I want to check if a user AB in compartment XY is granted an "instances" resource.
I tried to use IdentityClient.listPolicies(comparment), it lists all the policies in the compartment but not the effective policies for the user.
Upvotes: 0
Views: 759
Reputation: 11
There isn't a way to do this yet. If you base your policies on group membership, it's easiest to look up what groups user AB is in. https://docs.cloud.oracle.com/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/iam/group/list-users.html
Upvotes: 1