# API to see all the IAM policies and their rules

**URL:** <https://community.dynatrace.com/t/api-to-see-all-the-iam-policies-and-their-rules/48011>\
**Category:** Dynatrace API\
**Tags:** account-management, latest-dynatrace, documentation, dynatrace-api\
**Created:** [September 27, 2024, 9:23am UTC](https://community.dynatrace.com/t/api-to-see-all-the-iam-policies-and-their-rules/48011 "2024-09-27T09:23:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dvb](https://avatars.discourse-cdn.com/v4/letter/d/bbce88/32.png) [@dvb](https://community.dynatrace.com/u/dvb)\
**Post date:** [September 27, 2024, 9:23am UTC](https://community.dynatrace.com/t/api-to-see-all-the-iam-policies-and-their-rules/48011/1 "2024-09-27T09:23:49Z")

</div>

is there an API to see all the IAM policies and their rules :

Background:  
there are multiple policies in our tenant and we want to document the same to make sure the same is available for future refernce, does Dynatrace provides any API that lists and shows the details ( the get policies, just show the name not the rule behind the policy), or do we maintain any audit of the changes done to the policies?

---

<div class="post-metadata">

**Author:** ![PedroSantos](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pedrosantos/32/28150_2.png) [@PedroSantos](https://community.dynatrace.com/u/PedroSantos)\
**Post date:** [September 27, 2024, 2:43pm UTC](https://community.dynatrace.com/t/api-to-see-all-the-iam-policies-and-their-rules/48011/2 "2024-09-27T14:43:09Z")

</div>

Hey [@dvb](https://community.dynatrace.com/user/55807) ,  
You should be able to go to:

![PedroSantos_0-1727448103914.png](https://global.discourse-cdn.com/dynatrace/original/3X/6/7/674cad8e3501e5a79ca8c34fb3fe78d0c9123218.png)

As indicated [here.](https://docs.dynatrace.com/docs/manage/identity-access-management/permission-management/manage-user-permissions-policies/iam-policy-mgt)

If you’d rather use an API, I think v1 has a way to do this but I haven’t tested it myself. Refer to [this link](https://api.dynatrace.com/spec/#/Policy%20management/PolicyController_) for helpful info.

Good luck!

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [September 28, 2024, 3:49pm UTC](https://community.dynatrace.com/t/api-to-see-all-the-iam-policies-and-their-rules/48011/3 "2024-09-28T15:49:20Z")

</div>

Hello&nbsp;[@dvb](https://community.dynatrace.com/user/55807)

1. You should have cluster admin privileges to navigate Cluster API v2 and execute the below command.

![Peter_Youssef_0-1727537970635.png](https://global.discourse-cdn.com/dynatrace/optimized/3X/c/c/cc8d11aa72351f914a41dd13cdf29cbf274874c0_2_690x19.png)

 ![IAM.png](https://global.discourse-cdn.com/dynatrace/original/3X/3/0/30985ff365b747d94d124d100082d038cc163526.png)

**After successful execution you should get**

1. curl -X ‘GET’ \  
‘[https://abcdefg/api/cluster/v2/iam/configuration/policystatements](https://abcdefg/api/cluster/v2/iam/configuration/policystatements)’ \  
-H ‘accept: application/json’
2. The request URL should be like this [https://abcdefg/api/cluster/v2/iam/configuration/policystatements](https://abcdefg/api/cluster/v2/iam/configuration/policystatements).

**Tip** :

- As per the current version “1.300.61.20240926-012142” in Dynatrace Managed: doesn’t require Access token.

 ![response code.png](https://global.discourse-cdn.com/dynatrace/original/2X/b/be2bd5a9dae4f56978c05421e4e18cf75466a4ce.png)

Regards,
