Search users by user id

This call searches for users by user IDs by searching for users whose user ID starts with the given string. See User. This call returns custom LDAP attributes along with other user information, unless issued with the fields="ldapStandardAttributes" parameter, which adds LDAP standard attributes to the response. Note that the call searches only on the email address as the user ID.

HTTP Method

GET

Request URI

/msa/v1/cps/user?uid=<String>&fields="ldapStandardAttributes"&offset=<Offset>&limit=<Limit>

Request parameters

 

Parameter

Description

Sample Value

uid

Parameter Type: Query

Data Type: String

The email prefix, for example, the “btarris” in “:[email protected].”

fields="ldapStandardAttributes"

Optional

Parameter Type: Query

Data Type: String

If this parameter is included, the return includes the following standard LDAP attributes:

distinguishedName

samAccountName

userPrincipalName

fields="ldapStandardAttributes"

offset

Parameter Type: Query

Data Type: Number

Default: 0

0

limit

Parameter Type: Query

Data Type: String

Default: 50

50

Response fields

A list of users.

See List of identifiers and User.

Example responses

Local accountSource

{
    "searchResults": [
        {
            "enabled": true, 
            "createdAt": 1466202626423, 
            "accountSource": "LOCAL", 
            "displayName": "JGB", 
            "emailAddress": "[email protected]", 
            "firstName": "Josh", 
            "lastName": "Brit", 
            "userId": "[email protected]", 
            "userUuid": "0aed8d85-6dfd-40ac-b3b5-82f629e3c168"
        }, 
        {
            "enabled": true, 
            "createdAt": 1466525975950, 
            "accountSource": "LOCAL", 
            "displayName": "Bob Tarris", 
            "emailAddress": "[email protected]", 
            "firstName": "Bob", 
            "lastName": "Tarris", 
            "userId": "[email protected]", 
            "userUuid": "b7149c70-30ef-4b88-b8f3-18ec273e8c80"
        }, 
        {
            "enabled": true, 
            "createdAt": 1467161380058, 
            "accountSource": "LOCAL", 
            "displayName": "test user", 
            "emailAddress": "[email protected]", 
            "firstName": "test", 
            "lastName": "user", 
            "userId": "[email protected]", 
            "userUuid": "e0ad3de5-2390-4bb3-afdf-acfa9838503b", 
            "custom_user": "from rest 2"
        }
    ], 
    "results": 3, 
    "offset": 0, 
    "limit": 10
}

LDAP accountSource with fields="ldapStandardAttributes" parameter included in the call

{
  "limit": 50,
  "offset": 0,
  "results": 1,
  "searchResults": [
    {
      "accountSource": "LDAP",
      "createdAt": 1500444347689,
      "displayName": "Fred A",
      "emailAddress": "[email protected]",
      "enabled": true,
      "firstName": "Fred",
      "ldapCustomAttributes": {
        "lastlogontimestamp": "131516814255658414",
        "mailnickname": "Fred",
        "mdbusedefaults": "TRUE",
        "msexchmailboxguid": "k\ufffd\ufffdVt\ufffdN\ufffd\ufffdS)\u289e=",
        "msexchrecipientdisplaytype": "1073741824",
        "msexchwhenmailboxcreated": "20140407185418.0Z"
      },
      "ldapStandardAttributes": {
        "distinguishedName": "foo",
        "samAccountName": "bar",
        "userPrincipalName": "baz"
      }
      "userId": "[email protected]",
      "userUuid": "a3343fd0-c1f2-424f-a993-83b951c94246"
    }
  ]
}