Skip to main content

Search Users​

Search for users within an organization. By default, we will return users of your organization. Make sure to include a limit and sorting for pagination.

Header Parameters
    x-zitadel-orgid string

    The default is always the organization of the requesting user. If you like to get users of another organization include the header. Make sure the user has permission to access the requested data.

Request Body required
    query object

    Object unspecific list filters like offset, limit and asc/desc.

    offset uint64
    limit int64

    Maximum amount of events returned. The default is set to 1000 in https://github.com/zitadel/zitadel/blob/new-eventstore/cmd/zitadel/startup.yaml. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.

    asc boolean

    default is descending

    sortingColumn the field the result is sorted

    Possible values: [USER_FIELD_NAME_UNSPECIFIED, USER_FIELD_NAME_USER_NAME, USER_FIELD_NAME_FIRST_NAME, USER_FIELD_NAME_LAST_NAME, USER_FIELD_NAME_NICK_NAME, USER_FIELD_NAME_DISPLAY_NAME, USER_FIELD_NAME_EMAIL, USER_FIELD_NAME_STATE, USER_FIELD_NAME_TYPE, USER_FIELD_NAME_CREATION_DATE]

    Default value: USER_FIELD_NAME_UNSPECIFIED

    queries object[]
  • Array [
  • userNameQuery object
    userName string

    Possible values: <= 200 characters

    method string

    Possible values: [TEXT_QUERY_METHOD_EQUALS, TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE, TEXT_QUERY_METHOD_STARTS_WITH, TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE, TEXT_QUERY_METHOD_CONTAINS, TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE, TEXT_QUERY_METHOD_ENDS_WITH, TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE]

    Default value: TEXT_QUERY_METHOD_EQUALS

    defines which text equality method is used

    firstNameQuery object
    firstName string

    Possible values: <= 200 characters

    method string

    Possible values: [TEXT_QUERY_METHOD_EQUALS, TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE, TEXT_QUERY_METHOD_STARTS_WITH, TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE, TEXT_QUERY_METHOD_CONTAINS, TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE, TEXT_QUERY_METHOD_ENDS_WITH, TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE]

    Default value: TEXT_QUERY_METHOD_EQUALS

    defines which text equality method is used

    lastNameQuery object
    lastName string

    Possible values: <= 200 characters

    method string

    Possible values: [TEXT_QUERY_METHOD_EQUALS, TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE, TEXT_QUERY_METHOD_STARTS_WITH, TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE, TEXT_QUERY_METHOD_CONTAINS, TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE, TEXT_QUERY_METHOD_ENDS_WITH, TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE]

    Default value: TEXT_QUERY_METHOD_EQUALS

    defines which text equality method is used

    nickNameQuery object
    nickName string
    method string

    Possible values: [TEXT_QUERY_METHOD_EQUALS, TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE, TEXT_QUERY_METHOD_STARTS_WITH, TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE, TEXT_QUERY_METHOD_CONTAINS, TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE, TEXT_QUERY_METHOD_ENDS_WITH, TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE]

    Default value: TEXT_QUERY_METHOD_EQUALS

    defines which text equality method is used

    displayNameQuery object
    displayName string

    Possible values: <= 200 characters

    method string

    Possible values: [TEXT_QUERY_METHOD_EQUALS, TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE, TEXT_QUERY_METHOD_STARTS_WITH, TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE, TEXT_QUERY_METHOD_CONTAINS, TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE, TEXT_QUERY_METHOD_ENDS_WITH, TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE]

    Default value: TEXT_QUERY_METHOD_EQUALS

    defines which text equality method is used

    emailQuery object
    emailAddress string

    Possible values: <= 200 characters

    email address of the user

    method string

    Possible values: [TEXT_QUERY_METHOD_EQUALS, TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE, TEXT_QUERY_METHOD_STARTS_WITH, TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE, TEXT_QUERY_METHOD_CONTAINS, TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE, TEXT_QUERY_METHOD_ENDS_WITH, TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE]

    Default value: TEXT_QUERY_METHOD_EQUALS

    defines which text equality method is used

    stateQuery object
    state string

    Possible values: [USER_STATE_UNSPECIFIED, USER_STATE_ACTIVE, USER_STATE_INACTIVE, USER_STATE_DELETED, USER_STATE_LOCKED, USER_STATE_SUSPEND, USER_STATE_INITIAL]

    Default value: USER_STATE_UNSPECIFIED

    current state of the user

    typeQuery object
    type string

    Possible values: [TYPE_UNSPECIFIED, TYPE_HUMAN, TYPE_MACHINE]

    Default value: TYPE_UNSPECIFIED

    the type of the user

    loginNameQuery object
    loginName string

    Possible values: <= 200 characters

    method string

    Possible values: [TEXT_QUERY_METHOD_EQUALS, TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE, TEXT_QUERY_METHOD_STARTS_WITH, TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE, TEXT_QUERY_METHOD_CONTAINS, TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE, TEXT_QUERY_METHOD_ENDS_WITH, TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE]

    Default value: TEXT_QUERY_METHOD_EQUALS

    defines which text equality method is used

    inUserIdsQuery object
    userIds string[]

    the ids of the users to include

    orQuery object
    queries object[]

    the sub queries to 'OR'

  • Array [
  • 0
    1
    2
    3
    4
    5
    6
    7
    8
    9
  • ]
  • andQuery object
    queries object[]

    the sub queries to 'AND'

  • Array [
  • 0
    1
    2
    3
    4
    5
    6
    7
    8
    9
  • ]
  • notQuery object
    query object

    the sub query to negate (NOT)

    0
    1
    2
    3
    4
    5
    6
    7
    8
    9
    inUserEmailsQuery object
    userEmails string[]

    the emails of the users to include

  • ]
Responses

A list of all users matching the query


Schema
    details object
    totalResult uint64
    processedSequence uint64
    viewTimestamp date-time

    the last time the view got updated

    sortingColumn string

    Possible values: [USER_FIELD_NAME_UNSPECIFIED, USER_FIELD_NAME_USER_NAME, USER_FIELD_NAME_FIRST_NAME, USER_FIELD_NAME_LAST_NAME, USER_FIELD_NAME_NICK_NAME, USER_FIELD_NAME_DISPLAY_NAME, USER_FIELD_NAME_EMAIL, USER_FIELD_NAME_STATE, USER_FIELD_NAME_TYPE, USER_FIELD_NAME_CREATION_DATE]

    Default value: USER_FIELD_NAME_UNSPECIFIED

    result object[]
  • Array [
  • id string
    details object
    sequence uint64

    on read: the sequence of the last event reduced by the projection

    on manipulation: the timestamp of the event(s) added by the manipulation

    creationDate date-time

    on read: the timestamp of the first event of the object

    on create: the timestamp of the event(s) added by the manipulation

    changeDate date-time

    on read: the timestamp of the last event reduced by the projection

    on manipulation: the

    resourceOwner resource_owner is the organization an object belongs to
    state string

    Possible values: [USER_STATE_UNSPECIFIED, USER_STATE_ACTIVE, USER_STATE_INACTIVE, USER_STATE_DELETED, USER_STATE_LOCKED, USER_STATE_SUSPEND, USER_STATE_INITIAL]

    Default value: USER_STATE_UNSPECIFIED

    current state of the user

    userName string
    loginNames string[]
    preferredLoginName string
    human object

    one of type use human or machine

    profile object
    firstName string
    lastName string
    nickName string
    displayName string

    a user can set the display name, if nothing is set ZITADEL computes "first_name last_name"

    preferredLanguage string

    language tag analog https://tools.ietf.org/html/rfc3066

    gender string

    Possible values: [GENDER_UNSPECIFIED, GENDER_FEMALE, GENDER_MALE, GENDER_DIVERSE]

    Default value: GENDER_UNSPECIFIED

    the gender of the human

    avatarUrl string

    avatar URL of the user

    email object
    email string

    email address of the user. (spec: https://tools.ietf.org/html/rfc2822#section-3.4.1)

    isEmailVerified boolean

    Is true if the user verified the email or if the email is managed outside ZITADEL

    phone object
    phone string

    mobile phone number of the user. (use global pattern of spec https://tools.ietf.org/html/rfc3966)

    isPhoneVerified boolean

    Is true if the user verified the phone or if the phone is managed outside ZITADEL

    machine object

    one of type use human or machine

    name string
    description string
    hasSecret boolean
    accessTokenType string

    Possible values: [ACCESS_TOKEN_TYPE_BEARER, ACCESS_TOKEN_TYPE_JWT]

    Default value: ACCESS_TOKEN_TYPE_BEARER

    Type of access token to receive

  • ]
Loading...