# Get users by id or email

`GET https://api.airtable.com/v0/meta/enterpriseAccounts/{enterpriseAccountId}/users`

Returns basic information relevant to both [internal](https://airtable.com/developers/web/api/org-management-glossary.md#internal-user) and [external](https://airtable.com/developers/web/api/org-management-glossary.md#external-user) user.

## Requirements

- **Authentication:** [Personal access token](https://airtable.com/developers/web/api/authentication.md#types-of-token), [OAuth integration](https://airtable.com/developers/web/api/authentication.md#types-of-token)
- **Scope:** [`enterprise.user:read`](https://airtable.com/developers/web/api/scopes.md#enterprise-user-read)
- **User role:** Enterprise admin
- **Billing plans:** Enterprise (pre-2023.08 legacy plan), Enterprise Scale

## Path parameters

- `enterpriseAccountId: string`

## Query parameters

- `email: array<string>` — optional

  Email addresses to search by. If the request does not have any userIds, you must include at least one email address.

- `id: array<string>` — optional

  User Ids to search by. If the request does not have any email addresses, you must include at least one userId.

- `include: array<"collaborations" | "aggregated" | "descendants">` — optional

  Allows optionally including collaborations in response.

## Response format

- `users: array<object>` — required

  - `id: string` — required

    A user ID

  - `state: "provisioned" | "deactivated"` — required

    [provisioned](https://airtable.com/developers/web/api/org-management-glossary.md#provisioned-user) | [deactivated](https://airtable.com/developers/web/api/org-management-glossary.md#deactivated-user)

  - `isServiceAccount: boolean` — required

    Whether the user is a [service account](https://support.airtable.com/docs/en/service-accounts-overview).

  - `isSsoRequired: boolean` — required

    Whether the user is required to authenticate through their administrating enterprise's identity provider to login.
    False if user is not on an enterprise.

  - `isTwoFactorAuthEnabled: boolean` — required

    Whether the user configured a second authentication method when logging in to Airtable through username/password auth.

  - `lastActivityTime: string | null` — required

    Most recent time the user interacted with this enterprise account's data. null if never.

  - `collaborations: Collaborations` — optional

    The user's direct collaborations on workspaces, bases and interfaces associated with this enterprise account.
    Excludes collaborations from groups.

  - `createdTime: string` — optional

    When user was created.  This field is only returned when user is internal.

  - `descendants: object` — optional

    The user's values per descendant enterprise account.
    Only returned when the user is on a claimed domain and the enterprise account has the Enterprise Hub feature enabled.

    - `[key: string]: object`

      - `licenseType: "editor" | "contributor" | "builder" | "viewer" | "viewerRestricted" | "portalEditor" | "none"` — optional

        The currently assigned license of a user. Only available for enterprise accounts with the new billing model.

      - `lastActivityTime: string | null` — required

      - `collaborations: Collaborations` — optional

      - `isAdmin: boolean` — optional

      - `isManaged: boolean` — optional

      - `groups: array<object>` — optional

        - `id: string` — required

          A user group ID

  - `enterpriseUserType: "accessReadOnlyShareLinks" | "full"` — optional

    The type of user. Only returned if the enterprise has group mappings active and only if user is internal.

  - `invitedToAirtableByUserId: string | null` — optional

    This field is only returned when either the inviter or the user is internal.
    If there is no inviter, this field is null.
    If user is internal but inviter is external, this field is "usrEXTERNREDACTED".

  - `isAdmin: boolean` — optional

    Whether the user has directly assigned admin rights over this enterprise account. Only returned when
    the user is on a claimed domain.
    Note: if a user is a super admin but is not directly assigned admin rights over this enterprise account, this field is `false`.

  - `isManaged: boolean` — optional

    Whether the user is managed by this enterprise account. Only returned when the user is on a claimed domain.

  - `isSuperAdmin: boolean` — optional

    Whether the user has super admin rights over this enterprise account. Only returned when the user is on a claimed
    domain and the enterprise account has the Enterprise Hub feature enabled.

  - `licenseType: "editor" | "contributor" | "builder" | "viewer" | "viewerRestricted" | "portalEditor" | "none"` — optional

    The currently assigned license of a user. Only available for enterprise accounts with the new billing model.

  - `email: string` — required

  - `name: string` — required

  - `aggregated: object` — optional

    The user's aggregated values across this enterprise account and its descendants.
    Only returned when the user is on a claimed domain and the enterprise account has the Enterprise Hub feature enabled.

    - `lastActivityTime: string | null` — required

      Most recent time the user interacted with this enterprise account and its descendants' data. null if never.

    - `collaborations: Collaborations` — optional

      The user's direct collaborations on workspaces, bases and interfaces associated with this enterprise account and its descendants.
      Excludes collaborations from groups.

    - `isAdmin: boolean` — optional

      Whether the user has directly assigned admin rights over this enterprise account or its descendants.

    - `licenseType: "editor" | "contributor" | "builder" | "viewer" | "viewerRestricted" | "portalEditor" | "none"` — optional

      The currently assigned license of a user. This is the highest license type assigned to the user across the enterprise account and its descendants. Only available for enterprise accounts with the new billing model.

    - `groups: array<object>` — optional

      This field specifies the groups associated with this enterprise account and its descendants that the user belongs to.

      - `id: string` — required

        A user group ID

  - `groups: array<object>` — optional

    This field specifies the groups associated with this enterprise account that the user belongs to.
    This field is only returned when the user is internal.

    - `id: string` — required

      A user group ID

### Example — Example response

```sh
curl "https://api.airtable.com/v0/meta/enterpriseAccounts/{enterpriseAccountId}/users\
?email[]=foo%40bar.com&id[]=usrsOEchC9xuwRgKk&include[]=collaborations" \
-H "Authorization: Bearer YOUR_TOKEN"
```

```json
{
  "users": [
    {
      "collaborations": {
        "baseCollaborations": [
          {
            "baseId": "appLkNDICXNqxSDhG",
            "createdTime": "2019-01-03T12:33:12.421Z",
            "grantedByUserId": "usrqccqnMB2eHylqB",
            "permissionLevel": "edit"
          }
        ],
        "interfaceCollaborations": [],
        "workspaceCollaborations": []
      },
      "createdTime": "2019-01-03T12:33:12.421Z",
      "email": "baz@bar.com",
      "groups": [
        {
          "id": "ugpR8ZT9KtIgp8Bh3"
        }
      ],
      "id": "usrsOEchC9xuwRgKk",
      "invitedToAirtableByUserId": "usrGcrteE5fUMqq0R",
      "isAdmin": false,
      "isManaged": true,
      "isServiceAccount": false,
      "isSsoRequired": true,
      "isTwoFactorAuthEnabled": false,
      "lastActivityTime": "2019-01-03T12:33:12.421Z",
      "name": "baz bar",
      "state": "provisioned"
    },
    {
      "collaborations": {
        "baseCollaborations": [
          {
            "baseId": "appLkNDICXNqxSDhG",
            "createdTime": "2019-01-03T12:33:12.421Z",
            "grantedByUserId": "usrqccqnMB2eHylqB",
            "permissionLevel": "edit"
          }
        ],
        "interfaceCollaborations": [
          {
            "baseId": "appLkNDICXNqxSDhG",
            "createdTime": "2019-01-03T12:33:12.421Z",
            "grantedByUserId": "usrogvSbotRtzdtZW",
            "interfaceId": "pbdyGA3PsOziEHPDE",
            "permissionLevel": "edit"
          }
        ],
        "workspaceCollaborations": [
          {
            "createdTime": "2019-01-03T12:33:12.421Z",
            "grantedByUserId": "usrGcrteE5fUMqq0R",
            "permissionLevel": "owner",
            "workspaceId": "wspmhESAta6clCCwF"
          }
        ]
      },
      "createdTime": "2019-01-03T12:33:12.421Z",
      "email": "foo@bar.com",
      "groups": [
        {
          "id": "ugp1mKGb3KXUyQfOZ"
        },
        {
          "id": "ugpR8ZT9KtIgp8Bh3"
        }
      ],
      "id": "usrL2PNC5o3H4lBEi",
      "invitedToAirtableByUserId": "usrsOEchC9xuwRgKk",
      "isAdmin": true,
      "isManaged": true,
      "isServiceAccount": false,
      "isSsoRequired": true,
      "isTwoFactorAuthEnabled": false,
      "lastActivityTime": "2019-01-03T12:33:12.421Z",
      "name": "foo baz",
      "state": "provisioned"
    }
  ]
}
```
