You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/terraform-docs-common/docs/cloud-docs/api-docs/organizations.mdx
+12-5Lines changed: 12 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -134,7 +134,8 @@ curl \
134
134
"owners-team-saml-role-id": null,
135
135
"two-factor-conformant": false,
136
136
"assessments-enforced": false,
137
-
"default-execution-mode": "remote"
137
+
"default-execution-mode": "remote",
138
+
"user-tokens-enabled": true
138
139
},
139
140
"relationships": {
140
141
"default-agent-pool": {
@@ -223,7 +224,8 @@ curl \
223
224
"owners-team-saml-role-id": null,
224
225
"two-factor-conformant": false,
225
226
"assessments-enforced": false,
226
-
"default-execution-mode": "remote"
227
+
"default-execution-mode": "remote",
228
+
"user-tokens-enabled": true
227
229
},
228
230
"relationships": {
229
231
"default-agent-pool": {
@@ -358,7 +360,8 @@ curl \
358
360
"owners-team-saml-role-id": null,
359
361
"two-factor-conformant": false,
360
362
"assessments-enforced": false,
361
-
"default-execution-mode": "remote"
363
+
"default-execution-mode": "remote",
364
+
"user-tokens-enabled": true
362
365
},
363
366
"relationships": {
364
367
"default-agent-pool": {
@@ -430,6 +433,7 @@ Properties without a default value are required.
430
433
|`data.attributes.default-execution-mode`| string |`remote`| Which [execution mode](/terraform/cloud-docs/workspaces/settings#execution-mode) to use by default. Valid values are `remote`, `local`, and `agent`. |
431
434
|`data.attributes.default-agent-pool-id`| string | (previous value) | Required when `default-execution-mode` is set to `agent`. The ID of the agent pool belonging to the organization. Do _not_ specify this value if you set `execution-mode` to `remote` or `local`. |
432
435
|`data.attributes.enforce-hyok`| boolean | false | Whether or not new workspaces within the organization are created with hold your own key enabled. Your organization must have a primary HYOK configuration before enabling `enforce-hyok`. Hold your own key is only available in HCP Terraform, [learn more](/terraform/cloud-docs/hold-your-own-key). |
436
+
|`data.attributes.user-tokens-enabled`| boolean | true | Whether or not user tokens can access an organization's resources through the API. Defaults to `true`. |
433
437
434
438
### Sample Payload
435
439
@@ -512,7 +516,8 @@ curl \
512
516
"owners-team-saml-role-id": null,
513
517
"two-factor-conformant": false,
514
518
"assessments-enforced": false,
515
-
"default-execution-mode": "remote"
519
+
"default-execution-mode": "remote",
520
+
"user-tokens-enabled": true
516
521
},
517
522
"relationships": {
518
523
"default-agent-pool": {
@@ -622,6 +627,7 @@ This PATCH endpoint requires a JSON object with the following properties as a re
622
627
|`data.attributes.default-execution-mode`| string |`remote`| Which [execution mode](/terraform/cloud-docs/workspaces/settings#execution-mode) to use by default. Valid values are `remote`, `local`, and `agent`. |
623
628
|`data.attributes.default-agent-pool-id`| string | (previous value) | Required when `default-execution-mode` is set to `agent`. The ID of the agent pool belonging to the organization. Do _not_ specify this value if you set `execution-mode` to `remote` or `local`. |
624
629
|`data.attributes.enforce-hyok`| boolean | false | Whether or not new workspaces within the organization are created with hold your own key (HYOK) enabled. Your organization must have a primary HYOK configuration before enabling `enforce-hyok`. Hold your own key is only available in HCP Terraform, [learn more](/terraform/cloud-docs/hold-your-own-key). |
630
+
|`data.attributes.user-tokens-enabled`| boolean | true | Whether or not user tokens can access an organization's resources through the API. Defaults to `true`. |
Copy file name to clipboardExpand all lines: content/terraform-docs-common/docs/cloud-docs/users-teams-organizations/api-tokens.mdx
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,26 @@ Refer to [Team Token API](/terraform/cloud-docs/api-docs/team-tokens) and [Organ
16
16
17
17
API tokens may belong directly to a user. User tokens are the most flexible token type because they inherit permissions from the user they are associated with. For more information on user tokens and how to generate them, see the [Users](/terraform/cloud-docs/users-teams-organizations/users#tokens) documentation.
18
18
19
+
### Disable user tokens for organizations
20
+
21
+
By default, user tokens are enabled for organizations. When your organization disables user tokens, the HCP Terraform API blocks user tokens from accessing organization resources.
22
+
23
+
To disable user tokens for your organization, perform the following steps:
24
+
1. Sign in to [HCP Terraform](https://app.terraform.io/) or Terraform Enterprise, then navigate to the organization where you want to disable user tokens.
25
+
1. Choose **Settings** from the sidebar, then **API tokens**.
26
+
1. From the **User Tokens** tab, uncheck the **Allow members to access organization resources with their user tokens** setting.
27
+
1. Click **Update settings**.
28
+
1. In the confirmation modal, select **Disable**.
29
+
1. User tokens are now disabled for this organization.
30
+
31
+
If your organization has automations that authenticate using user tokens, disabling user tokens can cause those automations to fail.
32
+
33
+
<Note>
34
+
35
+
An organization that disables user tokens cannot connect to VCS using the [Github (App)](/terraform/cloud-docs/vcs/github-app), because it relies on user tokens to authenticate. Your organization can use [Github (OAuth) to configure their VCS connections](/terraform/cloud-docs/vcs/github) instead.
0 commit comments