---
title: How to Detach a Role from a Group
url: https://docs.vultr.com/platform/iam/roles/how-to-detach-a-role-from-a-group
description: Detach an IAM role from a group on Vultr. Group members lose the permissions inherited from the role's policies while retaining their direct assignments.
publish_date: 2026-03-24T19:52:40.224605Z
last_updated: 2026-06-01T21:29:38.584411Z
---

Detaching a role from a group revokes the permissions granted through that role for all group members. Members retain any permissions assigned through other roles, direct policy attachments, or other groups.

Follow this guide to detach a role from a group using the Vultr Console, the Vultr API, or Terraform.

=== "Vultr Console"

    1. Log in to the [Vultr Console](https://console.vultr.com).
    1. Click the organization name in the top navigation bar.
    1. Click **Manage Organization**.
    1. Click the **Groups** tab.
    1. Click the name of the group from which you want to detach the role.
    1. In the **Roles** section, locate the role and click the **Remove** icon next to it.

        The role is detached and all group members lose the permissions granted through it.

=== "Vultr API"

    1. Send a `GET` request to the [**List Roles** endpoint](https://www.vultr.com/api/#tag/iam/operation/list-iam-roles) 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 detach from a group.

    1. Send a `GET` request to the [**List Groups with Role** endpoint](https://www.vultr.com/api/#tag/iam/operation/list-iam-role-groups) to retrieve all groups assigned to the role. Replace `{role-id}` with the id of the role. Note the `group_id` of the group you want to detach.

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

    1. Send a `DELETE` request to the [**Detach Role from Group** endpoint](https://www.vultr.com/api/#tag/iam/operation/remove-iam-group-from-role) to detach the role. Replace `{role-id}` with the role id and `{group-id}` with the group id.

        ```console
        $ curl "https://api.vultr.com/v2/roles/{role-id}/groups/{group-id}" \
            -X DELETE \
            -H "Authorization: Bearer ${VULTR_API_KEY}"
        ```

        A successful detachment returns an HTTP `204 No Content` response with no response body.

=== "Terraform"

    1. Ensure the [Vultr Terraform provider](https://registry.terraform.io/providers/vultr/vultr/latest/docs) is configured in your Terraform project.

    1. Remove the `vultr_organization_role_group_attachment` block from your Terraform configuration, then apply.

        ```console
        $ terraform apply
        ```

        Alternatively, destroy the attachment resource directly:

        ```console
        $ terraform destroy -target=vultr_organization_role_group_attachment.role-group-attachment
        ```

        Verify that the output shows `vultr_organization_role_group_attachment.role-group-attachment: Destruction complete`.