List all groups assigned to a specific IAM role on Vultr. Identify which groups and their members inherit the permissions from the role through the IAM API.
Listing groups assigned to a role allows you to see which groups have the permissions defined by that role. This is useful for auditing access configurations and understanding the scope of a role's impact across your organization.
This guide explains how to list groups assigned to a role using the Vultr Console and the Vultr API.
Log in to the Vultr Console.
Click the organization name in the top navigation bar.
Click Manage Organization.
Click the Roles tab.
Click the name of the role you want to inspect.
Expand the Attached Entities section.
Click the Group tab to filter by groups.
The table displays all groups attached to this role, including their name, type, and status.
Send a GET request to the List Roles endpoint to retrieve all roles in your organization.
$ curl "https://api.vultr.com/v2/roles" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Note the id of the role for which you want to list groups.
Send a GET request to the List Groups with Role endpoint to retrieve all groups assigned to the role. Replace {role-id} with the id of the role.
$ curl "https://api.vultr.com/v2/roles/{role-id}/groups" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
The response contains the requested resources.