---
title: Search users by user id
slug: cps-guide/mdm-epmm/search-users-by-user-id
createdAt: 2026-10-06T07:45:20.798Z
---

This call searches for users by user IDs by searching for users whose user ID starts with the given string. See [User](docId\:DK5wUaGcE74hME-EUyNkR). 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<br />**Data Type:** String                                                                                                                                                                                           | The email prefix, for example, the “btarris” in “\:btarris\@mobileiron.com.” |
| fields="ldapStandardAttributes" | **Optional**<br />**Parameter Type:** Query<br />**Data Type:** String<br />If this parameter is included, the return includes the following standard LDAP attributes:<br />- distinguishedName<br />- samAccountName<br />- userPrincipalName | fields="ldapStandardAttributes"                                              |
| offset                          | **Parameter Type:&#x20;**&#x51;uery<br />**Data Type:** Number<br />**Default:** 0                                                                                                                                                             | 0                                                                            |
| limit                           | **Parameter Type:&#x20;**&#x51;uery<br />**Data Type:** String<br />**Default:** 50                                                                                                                                                            | 50                                                                           |

## Response fields

A list of users.

See [List of identifiers](docId:0FgXpF4sPOcu6M7eESvy1) and [User](docId\:DK5wUaGcE74hME-EUyNkR).

## Example responses

### Local accountSource

```javascript
{
    "searchResults": [
        {
            "enabled": true, 
            "createdAt": 1466202626423, 
            "accountSource": "LOCAL", 
            "displayName": "JGB", 
            "emailAddress": "abc@mobileiron.com", 
            "firstName": "Josh", 
            "lastName": "Brit", 
            "userId": "abc@mobileiron.com", 
            "userUuid": "0aed8d85-6dfd-40ac-b3b5-82f629e3c168"
        }, 
        {
            "enabled": true, 
            "createdAt": 1466525975950, 
            "accountSource": "LOCAL", 
            "displayName": "Bob Tarris", 
            "emailAddress": "btarris@mobileiron.com", 
            "firstName": "Bob", 
            "lastName": "Tarris", 
            "userId": "btarris@mobileiron.com", 
            "userUuid": "b7149c70-30ef-4b88-b8f3-18ec273e8c80"
        }, 
        {
            "enabled": true, 
            "createdAt": 1467161380058, 
            "accountSource": "LOCAL", 
            "displayName": "test user", 
            "emailAddress": "test@mob.dev", 
            "firstName": "test", 
            "lastName": "user", 
            "userId": "test@mob.dev", 
            "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

```javascript
{
  "limit": 50,
  "offset": 0,
  "results": 1,
  "searchResults": [
    {
      "accountSource": "LDAP",
      "createdAt": 1500444347689,
      "displayName": "Fred A",
      "emailAddress": "Freda@auto8.mobileiron.com",
      "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": "Freda@auto8.mobileiron.com",
      "userUuid": "a3343fd0-c1f2-424f-a993-83b951c94246"
    }
  ]
}
```
