Overview
TheAuthorizationServiceApi provides methods for managing user authorizations (also known as user grants) in Zitadel. Authorizations define which roles a user has in a project or project grant.
Initialize the API
Authorization Management
create_authorization
create_authorization
update_authorization
update_authorization
delete_authorization
delete_authorization
list_authorizations
list_authorizations
Authorization State Management
activate_authorization
activate_authorization
deactivate_authorization
deactivate_authorization
Authorization Types
Project Authorization
Grants roles for a project owned by the current organization:Project Grant Authorization
Grants roles for a project that has been granted to the organization:Example: Grant User Access to Project
Example: Update User Roles
Example: List User’s Authorizations
Example: Temporary Access (Activate/Deactivate)
Example: Search Authorizations by Project
Example: Bulk Authorization Management
Authorization Query Filters
You can filter authorizations using various queries:By User ID
By Project ID
By Organization ID
By State
Authorization States
- ACTIVE: The authorization is active and the user can use the granted roles
- INACTIVE: The authorization exists but is temporarily disabled
Best Practices
- Principle of Least Privilege: Only grant the minimum roles required
- Regular Audits: Periodically review and clean up unused authorizations
- Use Groups: Consider using groups for managing permissions at scale
- Document Roles: Maintain clear documentation of what each role allows
- Temporary Access: Use activate/deactivate for temporary access instead of delete/create
- Error Handling: Always handle cases where authorizations may already exist or not be found
- Pagination: Use pagination when listing authorizations for large datasets