List all roles assigned to a specific user in your Vultr organization. View role assignments and inherited policy permissions for any user through the IAM API.
Listing roles for a specific user shows all roles assigned to the user, including directly assigned roles and those inherited through group memberships. This is useful for administrators to audit a user's access level and role assignments.
This guide explains how to list roles for a user 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 Users tab.
Click the name of the user you want to inspect.
Expand the Roles section.
The section displays all roles assigned to the user, including directly assigned and inherited roles.
Identify the user_id of the user. Follow the steps in How to List All Users in an Organization to retrieve user IDs.
Send a GET request to the List User's Roles endpoint to retrieve all roles for the user. Replace {user-id} with the id of the user.
$ curl "https://api.vultr.com/v2/users/{user-id}/roles" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
The response contains the requested resources.