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
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The 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
| Field | Type | Description |
|---|---|---|
id | integer | Unique user identifier |
userName | string | Egnyte username |
externalId | string | Immutable external identifier (e.g., AD SID) |
email | string | User's email address |
name | object | Contains familyName, givenName, and formatted |
active | boolean | Whether the user is active |
locked | boolean | Whether the user account is locked |
authType | string | Authentication type: ad, sso, or egnyte |
userType | string | User type: admin, power, or standard |
role | string | Role name (for Power Users only) |
idpUserId | string | SSO identity provider user ID |
isServiceAccount | boolean | Whether this is a service account |
language | string | User's language preference (if Language Pack is enabled) |
userPrincipalName | string | UPN for AD multi-domain setups |
createdDate | string | ISO 8601 timestamp of user creation |
lastModificationDate | string | ISO 8601 timestamp of last update |
lastActiveDate | string | ISO 8601 timestamp of last activity |
expiryDate | string | ISO 8601 timestamp when user expires (if set) |
deleteOnExpiry | boolean | Whether to delete user on expiry |
emailChangePending | boolean | Whether an email change is pending |
groups | array | List 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
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
startIndex | integer | No | 1 | The 1-based index of the first result |
count | integer | No | — | Maximum number of results per page (max: 100) |
filter | string | No | — | 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:
emailexternalIduserName
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
| Field | Type | Description |
|---|---|---|
totalResults | integer | Total number of users matching the query |
itemsPerPage | integer | Number of results returned in this response |
startIndex | integer | The 1-based index of the first result in this page |
resources | array | Array 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
| Field | Type | Required | Description |
|---|---|---|---|
userName | string | Yes | Egnyte username. Must start with a letter or digit. Only periods, hyphens, and underscores are allowed as special characters. |
email | string | Yes | Valid email address |
name | object | Yes | Object with givenName and familyName |
active | boolean | Yes | Whether the user is active |
authType | string | Yes | Authentication type: ad, sso, or egnyte |
userType | string | Yes | User type: admin, power, or standard |
externalId | string | No | Immutable external identifier (e.g., AD SID) |
sendInvite | boolean | No | Whether to send an invitation email (default: true). Always true for authType: egnyte. |
isServiceAccount | boolean | No | Whether to create as a Service Account (default: false) |
language | string | No | Language preference: en-US (default), fr-CA, or de-DE. Only accepted if Language Pack is enabled. |
role | string | No | Role name for Power Users (default: Default) |
idpUserId | string | No | SSO identity provider user ID. Required for SSO users not using default user mapping. |
userPrincipalName | string | No | UPN 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
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The unique user ID |
Request Body
All fields are optional. Only include fields you want to update.
| Field | Type | Description |
|---|---|---|
email | string | User's email address |
name.givenName | string | User's first name |
name.familyName | string | User's last name |
active | boolean | Whether the user is active |
sendInvite | boolean | Whether to send an invitation email. Cannot be the only field updated. |
language | string | Language preference: en-US, fr-CA, or de-DE |
authType | string | Authentication type: ad, sso, or egnyte |
userType | string | User type: admin, power, or standard |
role | string | Role name (for Power Users only) |
idpUserId | string | SSO identity provider user ID |
userPrincipalName | string | UPN 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
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The 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
| Status | Error | Description | Resolution |
|---|---|---|---|
| 400 | Bad Request | Request body is malformed or violates schema | Verify JSON syntax and required fields |
| 401 | Unauthorized | Invalid or expired OAuth token | Refresh your OAuth token |
| 403 | Forbidden | Operation not supported or insufficient permissions | Ensure the authenticated user has admin privileges |
| 404 | Not Found | User does not exist | Verify the user ID is correct |
| 409 | Conflict | User with the same username or email already exists | Use a unique username and email address |
| 429 | Rate Limited | Too many requests | Implement exponential backoff; check Retry-After header |
| 500 | Internal Server Error | Server encountered an unexpected error | Retry 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"
Related Resources
-
Authentication — How to obtain and refresh OAuth tokens
-
Group Management API — Manage user groups
-
Language Pack FAQ — Enable multi-language support
