2024-01-31 12:34:22 -05:00
---
layout: docs
page_title: roles remove-grant-scopes - Command
2024-12-17 14:13:18 -05:00
description: >-
The "roles remove-grant-scopes" command removes grant scopes from an existing role resource.
2024-01-31 12:34:22 -05:00
---
2025-11-04 10:22:10 -05:00
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
> [!IMPORTANT]
> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com.
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
2024-01-31 12:34:22 -05:00
# roles remove-grant-scopes
Command: `roles remove-grant-scopes`
The `roles remove-grant-scopes` command lets you remove grant scopes from a role.
You can specify multiple grant scopes per role.
## Example
This example removes a grant from a role with the ID `r_1234567890` in the current scope and any children scopes:
```shell-session
$ boundary roles remove-grant-scopes -id r_1234567890 -grant-scope-id "this" -grant-scope-id "children"
```
## Usage
<CodeBlockConfig hideClipboard>
```shell-session
$ boundary roles remove-grant-scopes [options] [args]
```
</CodeBlockConfig>
### Command options
- `-grant-scope-id=<string>` - The scope IDs that inherit grants removed from the role.
2025-07-10 09:39:54 -04:00
You can specify the following values:
2024-01-31 12:34:22 -05:00
- `this` - Applies to the current scope.
- `children` - Applies to all direct children of the scope and can only be used with global and org scopes.
- `descendants` - Applies to all descendants of the scope and can only be used with the global scope.
2025-07-10 09:39:54 -04:00
Boundary does not allow you to create redudnant grant scopes.
For example, if an org scope inherits a grant from the global scope, you cannot apply the same grant directly to the org scope.
2024-01-31 12:34:22 -05:00
- `-id=<string>` - The ID of the role you want to remove grant scopes from.
- `-version=<int>` The version of the role to remove grant scopes from.
If you do not specify a version, the command performs a check-and-set automatically.
@include 'cmd-option-note.mdx'