Resource-Scoped Roles, Permission Groups, and Zero Trust API Tokens
How Cloudflare member policies, resource-scoped roles, Permission Groups API, and Access API token permissions delegate Zero Trust access.
This page summarises Cloudflare documentation on member permission policies: how account, domain, and resource-specific scopes combine with permission groups (roles), how Cloudflare Access and Cloudflare Gateway support resource-scoped roles, and how API tokens and the Permission Groups API fit into automations. It focuses on delegation and least privilege—not on Access application policies that gate end-user traffic (Cloudflare Access policy actions).
Permission policies: actor, scope, and roles
Section titled “Permission policies: actor, scope, and roles”A Cloudflare permission policy (sometimes called a member policy) defines what a dashboard user or API integration may do. Policies are built from three parts:
- An actor (the member).
- A resource group (the scope—account-wide, selected domains, or specific resources).
- A permission group (the bundled roles granted in that scope).
A member’s effective permissions are the union of every policy assigned directly or inherited through User Groups. Administrators can attach multiple account-scoped policies to one member (a change described in the revamped Member Management UI changelog).
Role scopes: account, domains, or specific resources
Section titled “Role scopes: account, domains, or specific resources”Role scopes explain when to use each scope type:
| Scope | Use when |
|---|---|
| Account | Access across the whole account (billing, account settings). |
| Specific domains | A member should manage only certain zones (e.g. staging, not production). |
| Domain groups | Related domains share the same access pattern. |
| Specific resources | Access should bind to individual Access apps, Gateway policies, lists, tunnels, etc. |
Each policy allows only one scope, but you can assign multiple policies per user. Account-wide roles use Include → All domains in the dashboard flow described under account scope.
Resource-scoped roles: what they are and when to use them
Section titled “Resource-scoped roles: what they are and when to use them”Resource-scoped roles limit administration to one resource (or a picked set) instead of an entire product in the account. Cloudflare documents this layer for Cloudflare Zero Trust products and keeps it parallel to account-scoped roles—broad roles such as Cloudflare Zero Trust or Cloudflare Gateway still grant full product access.
Fine-grained permissions for Access Applications, Identity Providers (IdPs), and Targets is now available in Public Beta. This expands our RBAC model beyond account & zone-scoped roles, enabling administrators to grant permissions scoped to individual resources.
— Cloudflare, Fine-grained Permissioning for Access for Apps, IdPs, & Targets now in Public Beta
Cloudflare Access resource-scoped roles
Section titled “Cloudflare Access resource-scoped roles”The Roles reference lists Access-related resource-scoped roles (marked Beta in that doc):
| Role | What it limits |
|---|---|
| Cloudflare Access App Admin | One Access application |
| Cloudflare Access Identity Provider Admin | One IdP |
| Cloudflare Access Policy Admin | One Access policy |
| Cloudflare Access Service Token Admin | One service token |
| Access for Infrastructure Target Admin | One infrastructure target |
Fine-grained permissions for Access policies and service tokens adds Cloudflare Access policy admin and Cloudflare Access service token admin as resource-scoped roles that complement app, IdP, and target roles.
Access resource lists without account-wide read
Section titled “Access resource lists without account-wide read”Previously, members with only resource-scoped Access roles could not open list pages or call list APIs (403). Access resource lists now support resource-scoped roles changes that:
Members with only resource-scoped Access roles can now open Access resource list pages in the Cloudflare dashboard and call list endpoints in the API. They no longer need an additional account-scoped read-only role to list resources.
— Cloudflare, Access resource lists now support resource-scoped roles
List responses are filtered to resources in the member’s policy scopes (applications, policies, service tokens, identity providers). Reusable policies appear in policy lists only if the member has Cloudflare Access Policy Admin for those policies; Cloudflare Access App Admin sees policies attached directly to the selected application.
Cloudflare Gateway granular and resource-scoped roles
Section titled “Cloudflare Gateway granular and resource-scoped roles”Granular permissions for Gateway separates:
- Account-level Gateway roles (e.g. Zero Trust HTTP Policies Admin, Zero Trust Account Lists Admin) that apply account-wide to a resource type.
- Resource-scoped roles on individual Gateway policies or lists.
Important limits from that guide:
- Resource-scoped Gateway roles cover read/edit on existing policies or lists; creating new policies or lists requires an account-level role.
- DNS locations are not resource-scoped; use Zero Trust DNS Location Admin (account-level). Cloudflare Zero Trust Secure DNS Locations Write is a narrower role for secure / PDNS-style locations (Secure DNS Locations Management User Role).
For a single Gateway policy or list, access is allowed if the principal has either an account-level role that covers it or a resource-scoped role bound to that object. Listing endpoints such as GET /accounts/{account_id}/gateway/rules and GET /accounts/{account_id}/gateway/lists return only resources the caller may at least read (Granular permissions for Gateway).
New permissions and roles for Gateway policies and lists documents the dashboard role names (firewall, DNS, HTTP, network, egress, resolver, lists, read-only variants, etc.).
API tokens: permission groups and Access token permissions
Section titled “API tokens: permission groups and Access token permissions”Token policies mirror member policies
Section titled “Token policies mirror member policies”When you create tokens via API, each Access Policy on the token sets:
resources(account, zone, or user resource keys),permission_groups(IDs and names such as Zone Read),effect(allowvsdeny; explicit deny wins, then allow, then implicit deny).
Account resources use keys like com.cloudflare.api.account.<ACCOUNT_ID>. Permission names for tokens align with the account permission catalogue in API token permissions (scope com.cloudflare.api.account for account permissions).
New granular Access API token permissions
Section titled “New granular Access API token permissions”Three account-level Access permissions support narrow automations (New granular API token permissions for Cloudflare Access):
| Permission | Purpose |
|---|---|
| Access: Organizations Revoke | Revoke user sessions in a Zero Trust organization without broader org Edit |
| Access: Population Read | Read SCIM-synced users and groups |
| Access: Population Write | Create or modify SCIM-synced users and groups |
They combine with existing Access permissions at account scope. The full matrix—including Access: Policies Read/Edit, Access: Service Tokens Read/Edit, and related entries—lives in API token permissions.
Account-owned token templates group related keys (access, access_acct, teams, etc.) for dashboard-style token setup.
Permission Groups API replaces Account Roles API
Section titled “Permission Groups API replaces Account Roles API”Integrations that list assignable roles must migrate from the deprecated Account Roles API to the Permission Groups API (Account Role API deprecated, API deprecations).
| Legacy (deprecated) | Replacement |
|---|---|
GET /accounts/{account_id}/roles |
GET /accounts/{account_id}/iam/permission_groups |
GET /accounts/{account_id}/roles/{role_id} |
GET /accounts/{account_id}/iam/permission_groups/{permission_group_id} |
The Permission Groups API is the supported way to enumerate account, zone, and resource-level roles that can be granted to account members.
— Cloudflare, API deprecations
Schema differences matter for migrations:
- Legacy role objects expose a
descriptionand apermissionsobject keyed by resource type with read/edit flags. - Permission group objects use a
metaobject withlabelandscopes; individual permissions are not returned on the group.
Use Permission Group IDs from the new API in Account Members API policy payloads. Stored legacy role IDs need remapping. Terraform users should move from the cloudflare_account_role data source to cloudflare_account_permission_group (API deprecations). The new API supports API Token auth; Email + API Key remains for compatibility.
Troubleshooting forbidden API calls
Section titled “Troubleshooting forbidden API calls”Enriched documentation_url on 403 responses
Section titled “Enriched documentation_url on 403 responses”When the API returns 403 Forbidden, responses can include a documentation_url pointing at the denied endpoint’s docs (Enriched 403 responses for the Cloudflare API).
When a Cloudflare API request is denied, the error response now includes a documentation_url field that points to the documentation for that specific endpoint.
— Cloudflare, Enriched 403 responses for the Cloudflare API
Use that URL with API token permissions and Roles to see which permission groups an integration or member is missing.
Common mistakes
Section titled “Common mistakes”- Expecting resource-scoped edit to create new Gateway policies—creation needs an account-level Gateway admin role (Granular permissions for Gateway).
- Omitting read-only account role during Access resource beta when dashboard pages stay blank despite a resource-scoped admin role (Fine-grained Permissioning beta).
- Assuming Members page shows full access—check User Groups for inherited policies (Policies).
- Still calling
/rolesfor automation—switch to/iam/permission_groupsbefore legacy removal (API deprecations). - Granting Cloudflare CASB Read for DLP scans—CASB DLP still requires Cloudflare Zero Trust (CASB introduces new granular roles).
Grant Gateway access to one list or policy (dashboard)
Section titled “Grant Gateway access to one list or policy (dashboard)”- Open Manage Account → Members (Granular permissions for Gateway).
- Invite or edit the member and add a permission policy with a Gateway resource-scoped role.
- Under Scope, choose Specific resources.
- Set Resource type to Gateway policies or Gateway lists, then pick the objects.
- Save; repeat with additional policies if different roles apply to different resources.
How to check this on your site
Section titled “How to check this on your site”- In the Cloudflare dashboard, open Manage members and the member’s permission policies detail view (Member Management improvements).
- Confirm scope type (account, domains, or specific resources) matches intent using Role scopes.
- As that member, open Access or Gateway list pages—or call list APIs—and verify only in-scope resources appear (Access resource lists, Granular permissions for Gateway).
- For API integrations, call
GET /accounts/{account_id}/iam/permission_groupsinstead of deprecated/roles(API deprecations); on 403, readdocumentation_url(Enriched 403 responses). - You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact statement you are asking about.