zitadel_create_user_grant
Assigns project roles to a user after validating they exist in the project, using v2 AuthorizationService. Supports admin/standard keys.
Instructions
Assign project roles to a user via the v2 AuthorizationService. Validates that the roles exist in the project before granting. For the standardized two-role model prefer "admin"/"standard"; other keys are allowed but flagged as drift.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"userId": "<userId>",
"roleKeys": "<roleKeys>"
},
"name": "zitadel_create_user_grant"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | The user ID to grant roles to | |
| roleKeys | Yes | Array of role keys to assign (standardized: ["admin"] or ["standard"]) | |
| projectId | No | The project ID (uses default project if omitted) |