How to Attach a Role to a User

Updated on 08 April, 2026

Attach an IAM role directly to a user on Vultr. The user receives all permissions from the role's attached policies through the Vultr IAM system immediately.


Attaching a role to a user grants them all permissions defined by the policies within that role. This allows you to manage user access by assigning predefined permission sets rather than configuring individual policies for each user.

This guide explains how to attach a role to a user using the Vultr Console and the Vultr API.

  • Vultr Console
  • Vultr API
  1. Log in to the Vultr Console.

  2. Click the organization name in the top navigation bar.

  3. Click Manage Organization.

  4. Click the Roles tab.

  5. Click the name of the role you want to attach.

  6. In the Attached Entities section, click the + button.

  7. Search for and select the users you want to attach to this role.

  8. Click Attach Entities.

    The selected users appear in the Attached Entities list and inherit the role's permissions.

  1. Send a GET request to the List Roles endpoint to retrieve all roles in your organization.

    console
    $ curl "https://api.vultr.com/v2/roles" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    

    Note the id of the role you want to attach.

  2. Identify the user_id of the target user. Follow the steps in How to List All Users in an Organization to retrieve user IDs.

  3. Send a POST request to the Attach Role to User endpoint to attach the role. Replace {role-id} with the role id and {user-id} with the user id.

    console
    $ curl "https://api.vultr.com/v2/roles/{role-id}/users/{user-id}" \
        -X POST \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    

    A successful request returns an HTTP 201 Created response.

Comments