User Management API Overview
Overview
Using the user management APIs enables administrators to manage their users utilizing a management key.
Management keys are generated from Company > Management Keys. These keys will be used within the bearer token. The format is <Project ID>:<Management Key>
.
Use Cases
User Management:
- Load User
- Get User Provider Token
- Get Available Custom Attributes
- Create a Custom Attribute
- Delete a Custom Attribute
- Search Users
- Get User's Login History
- Create User
- Batch Create Users
- Update User
- Update User Status
- Update User Email
- Update User Login ID
- Update User Phone
- Update User Display Name
- Update User Picture
- Update User Custom Attributes
- Update JWT
- Expire User Password
- Set an Active User Password
- Set a Temporary User Password
- Update User Add Tenant
- Update User Remove Tenant
- Update User Add Role
- Set User's Roles
- Update User Remove Role
- Add Application to User
- Set Applications for User
- Remove Application from User
- Log user out of all sessions
- Delete User's passkeys
- Delete User
- Batch Delete User's
Examples
Example - load user
Utilize the Load User api endpoint to get the user information.
Caution! Do not use this ability inside a high called function such as an authentication middleware to get the user information! Instead learn how to implement custom claims to receive the data in the session token.
Example - create user
- Utilize the Create User api endpoint to create the user and apply the correct configuration for the user.
- The user can then login utilizing any sign-in api supported. This will then switch the user from invited to active.
Example - update a user's settings
There are multiple API methods which can modify users settings.
It is important to understand the difference between Update User and the other endpoints. Update User will take the configurations for the user provided and will overwrite all user settings. This means that if the user currently has email and phone, but the update only includes email, the phone and other non-provided configurations will be removed. With this, it is recommended to utilize the other update methods when updating fewer items on the user.
When a user's details are updated, for example additional roles are added, or other items regarding the user's details, the JWT will automatically be updated within the user's current session.
- Update User
- Update User Status
- Update User Email
- Update User Login ID
- Update User Phone
- Update User Display Name
- Update User Picture
- Update User Custom Attributes
- Expire User Password
- Update User Add Tenant
- Update User Remove Tenant
- Update User Add Role
- Update User Remove Role