Zitadel — Machine User & PAT
Create a Zitadel service account (machine user) and Personal Access Token (PAT) so CMP can create or link users during user migration.
The Web OIDC application's Client Secret and the machine-user PAT are different credentials:
| Credential | Purpose |
|---|---|
| Client Secret | End-user OIDC login |
| PAT | Administrative API (create/migrate users) |
Step 1 — Create service account
Path: Zitadel Console → Users → Service Accounts → + New
Choose a Machine / Service Account user (not Human).
| Field | Example / value |
|---|---|
| User Name | cmp-admin |
| Name | cmp-admin |
| Description | Optional |
| Access Token Type | Bearer |


Click Create.
Step 2 — Generate Personal Access Token
Open the cmp-admin service account → Personal Access Tokens → + New.
Set an expiration date if your policy requires it. Click Add/Create and copy the token immediately.

Treat the PAT as a secret. Do not commit it to source control, logs, tickets, or documentation. Store only in Admin → Settings → Social Login → Zitadel → PAT.
Step 3 — Grant permissions
A PAT without sufficient permission can authenticate but cannot create users.
Option A — Default organization (usual setup)
Path: Organization → use the + administrator control in the organization header.

- Select the
cmp-adminmachine user - Assign Org Owner
- Click Add

Option B — Whole instance
Path: Instance → Managers
- Add
cmp-admin - Assign IAM Owner
Use Option B when CMP must perform instance-level operations, including setups that create a new organization per account.
Do not rely only on project-level grants for migration. Use Org Owner on the default organization, or IAM Owner where instance-wide access is required.
Step 4 — Save PAT in CMP
Path: Admin → Settings → Social Login → Zitadel → Edit
Paste the PAT into the PAT field and save.
On later edits, leave PAT blank if CMP should keep the already stored token.
PAT setup checklist
- Service account exists (
cmp-adminor equivalent) - Access token type is Bearer
- PAT generated and copied securely
-
cmp-adminhas Org Owner (default org) or IAM Owner (instance-wide) - PAT stored in CMP Social Login
- Web OIDC Client Secret is not used as the PAT