CreateAuthorization
Create Authorization
CreateAuthorization creates a new authorization for a user in an owned or granted project.
Required permissions:
- "user.grant.write"
Header Parameters
Connect-Protocol-Version*number
Define the version of the Connect protocol
Value in
1Connect-Timeout-Ms?number
Define the timeout, in ms
Request Body
application/json
userId*string
UserID is the ID of the user who should be granted the authorization.
projectId*string
Project ID is the ID of the project the user should be authorized for.
organizationId*string
OrganizationID is the ID of the organization on which the authorization should be created. The organization must either own the project or have a grant for the project.
roleKeys?role_keys
RoleKeys are the keys of the roles the user should be granted.
[key: string]?never
Response Body
application/json
application/json
curl -X POST "https://loading/zitadel.authorization.v2.AuthorizationService/CreateAuthorization" \ -H "Connect-Protocol-Version: 1" \ -H "Content-Type: application/json" \ -d '{ "userId": "string", "projectId": "string", "organizationId": "string" }'{
"id": "string",
"creationDate": "1s"
}{
"code": "not_found",
"message": "string",
"detail": {
"type": "string",
"value": "string",
"debug": {}
}
}Was this page helpful?