Granting access to a user
Grant a role directly to a user by their email.production workspace.
Organization-wide grants
Use--org to grant a role across all workspaces in the organization.
Listing grants
List all grants in the organization:Removing a grant
Remove a workspace-scoped grant:Multiple grants
A user or token can have multiple grants. Permissions are combined (union of all roles).viewer access organization-wide and training-operator access in production.
Token grants
Tokens can also be granted roles. This is useful for CI/CD pipelines and automation.sf tokens create creates one grant per
role with no workspace scope, so these grants apply organization-wide. To scope a token’s role to a
single workspace, create the grant explicitly with sf grants create --token and --workspace.
See Tokens.
How grants interact with roles
Grants bind users or tokens to roles. Roles define what actions are allowed. The evaluation order is:- Collect all grants for the user or token on the target workspace (including organization-wide grants).
- Collect all rules from all matched roles.
- If any rule allows the action, allow.
- Otherwise, deny.