This API endpoint will search for users utilizing a valid management key. Searches can be defined with any combination of roles or tenants. You can also only send the request with an empty payload to return all users.
The response will include the following details on all users within an array of objects. The response includes the following; however, there are additional items in the response that you can see below by expanding the response 200 OK.
You can then parse through the response in order to find any users which you may need to delete, update, etc.
Use authorization bearer header with the following format:
Authorization: Bearer <ProjectId:ManagementKey>
OK
{- "users": [
- {
- "loginIds": [
- "string"
], - "userId": "string",
- "name": "string",
- "email": "string",
- "phone": "string",
- "verifiedEmail": true,
- "verifiedPhone": true,
- "roleNames": [
- "string"
], - "userTenants": [
- {
- "tenantId": "string",
- "roleNames": [
- "string"
], - "tenantName": "string"
}
], - "status": "string",
- "externalIds": [
- "string"
], - "picture": "string",
- "test": false,
- "customAttributes": { },
- "createdTime": 0,
- "TOTP": false,
- "SAML": false,
- "OAuth": {
- "property1": false,
- "property2": false
}, - "webauthn": true,
- "password": true,
- "ssoAppIds": [
- "string"
], - "givenName": "string",
- "middleName": "string",
- "familyName": "string",
- "editable": true
}
], - "total": 0
}