List all roles and policies attached to a specific IAM group on Vultr. Review the permissions inherited by group members through the Vultr IAM API endpoint.
Listing the roles and policies attached to a group allows you to review the permissions that all members of the group inherit. The API provides visibility into directly assigned permissions, those inherited from other sources, and permissions that come from roles attached to the group.
iam.group.* permissions assigned to perform this action.
This guide explains how to list roles and policies attached to a group using the Vultr Console or the Vultr API.
Log in to the Vultr Console.
Click the organization name in the top navigation bar.
Click Manage Organization.
Click the Groups tab.
Click the name of the group you want to inspect.
The group detail page displays the Roles and Members sections, showing all roles attached to the group and all users who are members. To view directly attached policies, navigate to the Permission Policies tab, select the policy, and view the group under Attached Entities.
Send a GET request to the List Groups endpoint to retrieve all groups in your organization.
$ curl "https://api.vultr.com/v2/groups" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Note the id of the group for which you want to list roles and policies.
Send a GET request to the List Group Roles endpoint to retrieve all roles attached to the group. Replace {group-id} with the id of the group.
$ curl "https://api.vultr.com/v2/groups/{group-id}/roles" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a GET request to the List Group Policies endpoint to retrieve all policies attached to the group.
$ curl "https://api.vultr.com/v2/groups/{group-id}/policies" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
The response contains the requested resources.