---
title: Revoke all Access tokens for a user
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/go)

[Zero Trust](https://developers.cloudflare.com/api/go/resources/zero_trust)

[Organizations](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/organizations)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Revoke all Access tokens for a user

client.ZeroTrust.Organizations.RevokeUsers(ctx, params) (\*[OrganizationRevokeUsersResponse](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.organizations%20%3E%20(model)%20OrganizationRevokeUsersResponse%20%3E%20(schema)>), error)

POST/{accounts\_or\_zones}/{account\_or\_zone\_id}/access/organizations/revoke\_user

Revokes a user’s access across all applications.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`Access: Organizations, Identity Providers, and Groups Write`

##### ParametersExpand Collapse

<details>

<summary>

params OrganizationRevokeUsersParams

</summary>

Email param.Field\[string]

Body param: The email of the user to revoke.

<a href="#(resource)%20zero_trust.organizations%20%3E%20(method)%20revoke_users%20%3E%20(params)%20default%20%3E%20(param)%20email">Link to this property</a>

AccountID param.Field\[string]Optional

Path param: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.

<a href="#(resource)%20zero_trust.organizations%20%3E%20(method)%20revoke_users%20%3E%20(params)%20default%20%3E%20(param)%20account_id">Link to this property</a>

ZoneID param.Field\[string]Optional

Path param: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

<a href="#(resource)%20zero_trust.organizations%20%3E%20(method)%20revoke_users%20%3E%20(params)%20default%20%3E%20(param)%20zone_id">Link to this property</a>

QueryDevices param.Field\[bool]Optional

Query param: When set to <code>true</code>, all devices associated with the user will be revoked.

<a href="#(resource)%20zero_trust.organizations%20%3E%20(method)%20revoke_users%20%3E%20(params)%20default%20%3E%20(param)%20devices">Link to this property</a>

QueryDevices param.Field\[bool]Optional

Query param: When set to <code>true</code>, all devices associated with the user will be revoked.

<a href="#(resource)%20zero_trust.organizations%20%3E%20(method)%20revoke_users%20%3E%20(params)%20default%20%3E%20(param)%20devices">Link to this property</a>

UserUID param.Field\[string]Optional

Body param: The uuid of the user to revoke.

<a href="#(resource)%20zero_trust.organizations%20%3E%20(method)%20revoke_users%20%3E%20(params)%20default%20%3E%20(param)%20user_uid">Link to this property</a>

WARPSessionReauth param.Field\[bool]Optional

Body param: When set to <code>true</code>, the user will be required to re-authenticate to WARP for all Gateway policies that enforce a WARP client session duration. When <code>false</code>, the user’s WARP session will remain active

<a href="#(resource)%20zero_trust.organizations%20%3E%20(method)%20revoke_users%20%3E%20(params)%20default%20%3E%20(param)%20warp_session_reauth">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.organizations%20%3E%20(method)%20revoke_users%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

type OrganizationRevokeUsersResponse bool

</summary>

One of the following:

const OrganizationRevokeUsersResponseTrue <a href="https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.organizations%20%3E%20(model)%20OrganizationRevokeUsersResponse%20%3E%20(schema)">OrganizationRevokeUsersResponse</a> = true

<a href="#(resource)%20zero_trust.organizations%20%3E%20(model)%20OrganizationRevokeUsersResponse%20%3E%20(schema)%20%3E%20(member)%200">Link to this property</a>

const OrganizationRevokeUsersResponseFalse <a href="https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.organizations%20%3E%20(model)%20OrganizationRevokeUsersResponse%20%3E%20(schema)">OrganizationRevokeUsersResponse</a> = false

<a href="#(resource)%20zero_trust.organizations%20%3E%20(model)%20OrganizationRevokeUsersResponse%20%3E%20(schema)%20%3E%20(member)%201">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.organizations%20%3E%20(model)%20OrganizationRevokeUsersResponse%20%3E%20(schema)>)

### Revoke all Access tokens for a user

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/zero_trust"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  response, err := client.ZeroTrust.Organizations.RevokeUsers(context.TODO(), zero_trust.OrganizationRevokeUsersParams{
    Email: cloudflare.F("test@example.com"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response)
}
```

200 example

```
{
  "result": true,
  "success": true
}
```

##### Returns Examples

200 example

```
{
  "result": true,
  "success": true
}
```