User Management API

The User Management API allows you to create, read, update, and delete users in your Egnyte domain. You can configure user roles, authentication types, language preferences, and control invitation emails for new users.

This API adheres to the SCIM (System for Cross-domain Identity Management) standard for user management.

Note: User Management API endpoints use /pubapi/v2/users, unlike most other Egnyte APIs which use v1.

Base URL

https://{domain}.egnyte.com/pubapi/v2/users

Authentication

All requests require an OAuth 2.0 Bearer token in the Authorization header:

Authorization: Bearer {access_token}

See Authentication for details on obtaining a token. To retrieve user information associated with an OAuth token, see User Auth Token.


Get Single User

Retrieves details for a specific user by ID.

Request

GET /pubapi/v2/users/{id}

Path Parameters

ParameterTypeRequiredDescription
idintegerYesThe unique user ID generated by Egnyte

Example Request

curl -i -X GET "https://{domain}.egnyte.com/pubapi/v2/users/{id}" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

200 OK

FieldTypeDescription
idintegerUnique user identifier
userNamestringEgnyte username
externalIdstringImmutable external identifier (e.g., AD SID)
emailstringUser's email address
nameobjectContains familyName, givenName, and formatted
activebooleanWhether the user is active
lockedbooleanWhether the user account is locked
authTypestringAuthentication type: ad, sso, or egnyte
userTypestringUser type: admin, power, or standard
rolestringRole name (for Power Users only)
idpUserIdstringSSO identity provider user ID
isServiceAccountbooleanWhether this is a service account
languagestringUser's language preference (if Language Pack is enabled)
userPrincipalNamestringUPN for AD multi-domain setups
createdDatestringISO 8601 timestamp of user creation
lastModificationDatestringISO 8601 timestamp of last update
lastActiveDatestringISO 8601 timestamp of last activity
expiryDatestringISO 8601 timestamp when user expires (if set)
deleteOnExpirybooleanWhether to delete user on expiry
emailChangePendingbooleanWhether an email change is pending
groupsarrayList of groups the user belongs to (each with displayName and value)

Example Response

{
  "id": 12345678,
  "userName": "jmiller",
  "externalId": "S-1-5-21-3623811015-3361044348-30300820-1013",
  "email": "john.miller@example.com",
  "name": {
    "familyName": "Miller",
    "givenName": "John"
  },
  "active": true,
  "createdDate": "2015-12-22T04:56:07.000+0000",
  "lastModificationDate": "2018-05-10T07:54:54.000+0000",
  "lastActiveDate": "2016-08-10T15:52:07.000+0000",
  "locked": false,
  "authType": "sso",
  "userType": "admin",
  "idpUserId": "jmiller",
  "isServiceAccount": false,
  "language": "en-US",
  "deleteOnExpiry": null,
  "emailChangePending": false,
  "expiryDate": null,
  "role": null,
  "userPrincipalName": null,
  "groups": [
    {
      "displayName": "Marketing Team",
      "value": "1ee2e04c-bdde-42ee-ae07-c3aad375f6da"
    },
    {
      "displayName": "Project Alpha",
      "value": "9125a8dc-52ee-365b-a5aa-81b0b3681cf6"
    }
  ]
}

Note: The language field is returned only when Language Pack is enabled for the domain and a language preference has been set for the user.


Get User List

Retrieves all users or a filtered subset. Supports pagination and filtering.

Request

GET /pubapi/v2/users

Query Parameters

ParameterTypeRequiredDefaultDescription
startIndexintegerNo1The 1-based index of the first result
countintegerNo—Maximum number of results per page (max: 100)
filterstringNo—Filter expression (see below)

Filtering

Use the filter parameter to request a subset of users. The filter expression supports the eq operator (case-insensitive) with the following attributes:

  • email
  • externalId
  • userName

Filter Syntax

filter={attribute} eq "{value}"

Example Filters

filter=userName eq "jmiller"
filter=email eq "john.miller@example.com"
filter=externalId eq "S-1-5-21-3623811015-3361044348-30300820-1013"

Note: Query parameters must be URL-encoded. For example, if filtering by externalId containing a + character, encode it as %2B: filter=externalId%20eq%20xxx%2Bxxx

Example Request

curl -i -X GET "https://{domain}.egnyte.com/pubapi/v2/users?startIndex=1&count=50&filter=userType%20eq%20%22admin%22" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

200 OK

FieldTypeDescription
totalResultsintegerTotal number of users matching the query
itemsPerPageintegerNumber of results returned in this response
startIndexintegerThe 1-based index of the first result in this page
resourcesarrayArray of user objects (same structure as Get Single User)

Example Response

{
  "totalResults": 100,
  "itemsPerPage": 2,
  "startIndex": 1,
  "resources": [
    {
      "id": 12345678,
      "userName": "jmiller",
      "externalId": "S-1-5-21-3623811015-3361044348-30300820-1013",
      "idpUserId": "",
      "email": "john.miller@example.com",
      "emailChangePending": false,
      "name": {
        "familyName": "Miller",
        "givenName": "John",
        "formatted": "John Miller"
      },
      "active": true,
      "isServiceAccount": false,
      "language": "en-US",
      "createdDate": "2015-12-22T04:56:07.000+0000",
      "lastModificationDate": "2018-05-10T07:54:54.000+0000",
      "lastActiveDate": "2016-08-10T15:52:07.000+0000",
      "locked": false,
      "authType": "ad",
      "userType": "admin",
      "role": null,
      "userPrincipalName": "jmiller@example.com",
      "expiryDate": null,
      "deleteOnExpiry": null
    },
    {
      "id": 17654328,
      "userName": "bjensen",
      "externalId": "S-1-5-21-3623811015-3361044348-30300820-1014",
      "idpUserId": "barbara.jensen",
      "email": "bjensen@example.com",
      "emailChangePending": false,
      "name": {
        "familyName": "Jensen",
        "givenName": "Barbara",
        "formatted": "Barbara Jensen"
      },
      "active": true,
      "isServiceAccount": false,
      "language": "de-DE",
      "createdDate": "2016-06-02T01:04:59.000+0000",
      "lastModificationDate": "2018-03-12T04:21:32.000+0000",
      "lastActiveDate": "2016-08-06T19:22:34.000+0000",
      "locked": false,
      "authType": "sso",
      "userType": "power",
      "role": "Billing Admin",
      "userPrincipalName": null,
      "expiryDate": null,
      "deleteOnExpiry": null
    }
  ]
}

Create Single User

Creates a new user in the Egnyte domain.

Request

POST /pubapi/v2/users

Request Body

FieldTypeRequiredDescription
userNamestringYesEgnyte username. Must start with a letter or digit. Only periods, hyphens, and underscores are allowed as special characters.
emailstringYesValid email address
nameobjectYesObject with givenName and familyName
activebooleanYesWhether the user is active
authTypestringYesAuthentication type: ad, sso, or egnyte
userTypestringYesUser type: admin, power, or standard
externalIdstringNoImmutable external identifier (e.g., AD SID)
sendInvitebooleanNoWhether to send an invitation email (default: true). Always true for authType: egnyte.
isServiceAccountbooleanNoWhether to create as a Service Account (default: false)
languagestringNoLanguage preference: en-US (default), fr-CA, or de-DE. Only accepted if Language Pack is enabled.
rolestringNoRole name for Power Users (default: Default)
idpUserIdstringNoSSO identity provider user ID. Required for SSO users not using default user mapping.
userPrincipalNamestringNoUPN for AD multi-domain setups (e.g., jmiller@example.com)

Example Request

curl -i -X POST "https://{domain}.egnyte.com/pubapi/v2/users" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
     -d '{
  "userName": "jmiller",
  "externalId": "S-1-5-21-3623811015-3361044348-30300820-1013",
  "email": "jmiller@example.com",
  "name": {
    "givenName": "John",
    "familyName": "Miller"
  },
  "active": true,
  "sendInvite": false,
  "language": "de-DE",
  "authType": "sso",
  "userType": "power",
  "idpUserId": "jmiller",
  "userPrincipalName": "jmiller@example.com"
}'

Response

201 Created

Returns the created user object (same structure as Get Single User).

The Location header contains the URL of the newly created user:

Location: https://apidemo.egnyte.com/pubapi/v2/users/12345678

Example Response

{
  "id": 12345678,
  "userName": "jmiller",
  "externalId": "S-1-5-21-3623811015-3361044348-30300820-1013",
  "email": "jmiller@example.com",
  "emailChangePending": false,
  "name": {
    "familyName": "Miller",
    "givenName": "John",
    "formatted": "John Miller"
  },
  "active": true,
  "locked": false,
  "authType": "sso",
  "userType": "power",
  "idpUserId": "jmiller",
  "userPrincipalName": null,
  "role": "Default",
  "language": "de-DE",
  "createdDate": "2015-08-14T20:02:18.000+0000",
  "lastModificationDate": "2015-08-14T20:02:18.000+0000",
  "lastActiveDate": null,
  "expiryDate": null,
  "deleteOnExpiry": null
}

Update Single User

Updates an existing user. Supports partial updates — only fields included in the request body will be modified.

Request

PATCH /pubapi/v2/users/{id}

Path Parameters

ParameterTypeRequiredDescription
idintegerYesThe unique user ID

Request Body

All fields are optional. Only include fields you want to update.

FieldTypeDescription
emailstringUser's email address
name.givenNamestringUser's first name
name.familyNamestringUser's last name
activebooleanWhether the user is active
sendInvitebooleanWhether to send an invitation email. Cannot be the only field updated.
languagestringLanguage preference: en-US, fr-CA, or de-DE
authTypestringAuthentication type: ad, sso, or egnyte
userTypestringUser type: admin, power, or standard
rolestringRole name (for Power Users only)
idpUserIdstringSSO identity provider user ID
userPrincipalNamestringUPN for AD multi-domain setups

Example Request

curl -i -X PATCH "https://{domain}.egnyte.com/pubapi/v2/users/{id}" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
     -d '{
  "email": "john.miller@example.com",
  "language": "de-DE",
  "userType": "admin"
}'

Response

200 OK

Returns the updated user object (same structure as Get Single User).

The Location header contains the URL of the updated user:

Location: https://apidemo.egnyte.com/pubapi/v2/users/12345678

Example Response

{
  "id": 12345678,
  "userName": "jmiller",
  "externalId": "S-1-5-21-3623811015-3361044348-30300820-1013",
  "email": "john.miller@example.com",
  "name": {
    "familyName": "Miller",
    "givenName": "John"
  },
  "active": true,
  "locked": false,
  "language": "de-DE",
  "authType": "sso",
  "userType": "admin",
  "idpUserId": "jmiller"
}

Delete Single User

Deletes a user from the Egnyte domain.

Request

DELETE /pubapi/v2/users/{id}

Path Parameters

ParameterTypeRequiredDescription
idintegerYesThe unique user ID

Example Request

curl -i -X DELETE "https://{domain}.egnyte.com/pubapi/v2/users/{id}" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

200 OK

No response body is returned on successful deletion.


Error Codes

StatusErrorDescriptionResolution
400Bad RequestRequest body is malformed or violates schemaVerify JSON syntax and required fields
401UnauthorizedInvalid or expired OAuth tokenRefresh your OAuth token
403ForbiddenOperation not supported or insufficient permissionsEnsure the authenticated user has admin privileges
404Not FoundUser does not existVerify the user ID is correct
409ConflictUser with the same username or email already existsUse a unique username and email address
429Rate LimitedToo many requestsImplement exponential backoff; check Retry-After header
500Internal Server ErrorServer encountered an unexpected errorRetry the request; contact support if the issue persists

Error Response Format

{
  "Errors": [
    {
      "description": "User 12345678 not found.",
      "code": "404"
    }
  ]
}

Code Examples

Create a Power User

curl -i -X POST "https://{domain}.egnyte.com/pubapi/v2/users" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
     -d '{
  "userName": "bjensen",
  "email": "bjensen@example.com",
  "name": {
    "givenName": "Barbara",
    "familyName": "Jensen"
  },
  "active": true,
  "authType": "egnyte",
  "userType": "power"
}'

List All Active Administrators

curl -i -X GET "https://{domain}.egnyte.com/pubapi/v2/users?filter=userType%20eq%20%22admin%22&count=100" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Get User Details

curl -i -X GET "https://{domain}.egnyte.com/pubapi/v2/users/{id}" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN"