Search Users

Search for users, using a valid management key.

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.

  • loginIds
  • userId
  • name
  • email
  • phone
  • verified settings (phone, email)
  • Tenant configurations - which tenantIds, which roleNames

Next Steps

You can then parse through the response in order to find any users which you may need to delete, update, etc.

See also

Endpoint Authentication

Use authorization bearer header with the following format:

Authorization: Bearer <ProjectId:ManagementKey>

SecurityAuthProjectIdMgmtKey
Request
Request Body schema: application/json
required
loginId
string

Search for specific login ID

tenantIds
Array of strings

If not empty then users must be members of at least one of these tenants

roleNames
Array of strings

If not empty then users must have one of the specified roles

limit
integer <int32>

Default is 100 if not specified

text
string

Full text search across relevant columns

page
integer <int32>

Page number starting with 0 for the first page

ssoOnly
boolean
Default: false

Bring only users that have SSO external IDs

withTestUser
boolean

Return also users which are test users

testUsersOnly
boolean
Default: false

Return only test users

customAttributes
object

Search for users with these custom attributes. Custom attributes filter should have string keys (attribute names that were configured for the user). Values should be either strings, ints or bools or lists (arrays) of strings, ints or bools for multiple matches.

statuses
Array of strings

If not empty then users must be in one of those statuses

emails
Array of strings
phones
Array of strings
ssoAppIds
Array of strings
Array of objects (managementv1.SortField)
Responses
200

OK

post/v1/mgmt/user/search
Request samples
Response samples
application/json
{
  • "users": [
    ],
  • "total": 0
}