Change a user.
Change the fields of one user of the calling key's tenant. Only what is sent is
changed, and sending the same body twice leaves the same state behind, so a caller can
reconcile against GET /users without tracking what it has already done.
The address and the tenant cannot be changed. The address is also the login name and the link to the account in the identity system, and a key is bound to one tenant; either change would produce a different person rather than an edited one.
Group membership is not changed here either — it is its own resource, at
PUT and DELETE /user-groups/{userGroupId}/users/{userId}.
A role change reaches the identity system, so a user who already has a login account carries the new role at their next sign-in. For a user who has not been invited there is no account yet and nothing to update there.
A user of a directory is not managed by Galilea, and the directory sends their role at
every sign-in; a role in the body answers 403 for them. Their name and language are
changed here as for anyone else.
Requires the right to edit users, which is the tenant manager and the administrator.
apiKeyX-API-Key<token>API key issued in the Galilea settings.
userId*stringThe id of the user, as returned by GET /users. Users are addressed by id rather
than by their address everywhere except the create, which has no id to work with yet.
uuidapplication/json- body
The fields of a user to change. Every field is optional: what is not sent keeps the value the user has, so a caller can correct a surname without knowing anything else about the person. Sending the same body twice leaves the same state behind.
Neither the address nor the tenant can be changed. The address is also the user's login name and the link to their account in the identity system, and a key is bound to one tenant; either change would produce a different person, not an edited one.
Group membership is not here either. A membership is its own resource, changed with
PUT and DELETE on /user-groups/{userGroupId}/users/{userId}.
firstName?stringGiven name.
length <= 150lastName?stringFamily name.
length <= 150role?stringThe role of the user. Changing somebody into the role light takes one of the
tenant's seats and is refused with 422 when none is left.
For a tenant with an external identity provider the role is advisory: the directory pushes the role on every login and overwrites what is set here.
"light""viewer""editor""tenantManager"preferredLanguage?stringLanguage of the Galilea interface and of generated answers.
"de_DE""en_US""nl_NL""sq_AL""hu_HU""es_ES""uk_UA""ro_RO"The user as they are now.
application/json- response
A user of the tenant, as returned by the user listing.
id*stringIdentifier of the user.
uuidemailAddress*stringThe address of the user, and their identity in this API.
emailfirstName?stringGiven name.
lastName?stringFamily name.
role*stringThe role of the user.
"light""viewer""editor""tenantManager"identityProvider*How the user signs in, one of the providers of the tenant as listed by
GET /identity-providers. Every user has exactly one; it was named when the user was
created and never changes. A script reconciling against GET /users reads here which
of its people are federated.
status*stringWhether the user has ever logged in. A user stays invited until their first
login, whether they were provisioned, invited or arrive through an identity
provider.
"invited""active"groups*array<>The team groups of the user. The personal group and the group of all users of the tenant are implicit and are not listed.
invitedAt?stringWhen the user was created in Galilea.
date-timelastActiveAt?|When the user last logged in; null while the user is invited.
date-timecurl -X PATCH "https://example.com/users/62e49dd6-954a-11ef-b06a-170340f38b3d" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "emailAddress": "anna.mueller@kunde.de", "firstName": "Anna", "lastName": "Müller", "role": "editor", "identityProvider": { "id": "8f1b0c2e-9a44-11ef-9f3d-4f0c2b6a1d77", "alias": "microsoft-entra" }, "status": "invited", "groups": [ { "id": "7d9030b3-4c0f-4051-9d54-79a6802a0c22", "name": "Legal" } ], "invitedAt": "2019-08-24T14:15:22Z", "lastActiveAt": "2019-08-24T14:15:22Z"}