Group Management

The Group Management API allows you to list groups, view group details, manage group membership, create groups, rename groups, and delete groups. This API is designed to comply with SCIM 1.1.

Note: Group Management endpoints use API version v2, unlike most other Egnyte APIs which use v1.

Note: The List Groups endpoint returns only custom groups. Egnyte default groups (All Power Users, All Standard Users and Power Users, and All Standard Users) are not returned.

Base URL

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

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.


List Groups

Returns all custom groups in your domain.

Request

GET /pubapi/v2/groups

Query Parameters

ParameterTypeRequiredDefaultDescription
startIndexintegerNo1The 1-based index of the first record to return (minimum: 1)
countintegerNo—Number of entries per page (minimum: 1, maximum: 100)
filterstringNo—Filter groups by display name. Supports eq (equals), co (contains), and sw (starts with). Example: displayName eq "accounting". URL-encode spaces.

Example Request

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

Response

200 OK

FieldTypeDescription
schemasarraySCIM schema version of the response
totalResultsintegerTotal number of groups matching the query
itemsPerPageintegerNumber of results returned in this response
startIndexinteger1-based index of the first result in the current set
resourcesarrayArray of group objects
resources[].idstringGlobally unique group ID
resources[].displayNamestringGroup name

Example Response

{
  "schemas": ["urn:scim:schemas:core:1.0"],
  "totalResults": 3,
  "itemsPerPage": 3,
  "startIndex": 1,
  "resources": [
    {
      "id": "8b9dd5aa-40ab-4a43-9b76-f55a412c8a6a",
      "displayName": "IT"
    },
    {
      "id": "d5ea2e76-63e4-4b47-92af-0d7ba6972e3c",
      "displayName": "Finance"
    },
    {
      "id": "a1004249-5e29-438f-ad72-b4e90af14ee7",
      "displayName": "Sales"
    }
  ]
}

Show Single Group

Returns details of a specific group, including its members.

Request

GET /pubapi/v2/groups/{group_id}

Path Parameters

ParameterTypeRequiredDescription
group_idstringYesGlobally unique group ID

Example Request

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

Response

200 OK

FieldTypeDescription
schemasarraySCIM schema version of the response
idstringGlobally unique group ID
displayNamestringGroup name
ownersarrayList of Egnyte usernames who are owners of this group
membersarrayArray of users in the group
members[].usernamestringUsername of the group member
members[].valueintegerGlobally unique user ID
members[].displaystringDisplay name of the group member

Example Response

{
  "schemas": ["urn:scim:schemas:core:1.0"],
  "id": "e3ba9d90-ebc7-483e-abaa-a84e92480c86",
  "displayName": "Finance",
  "owners": ["jdoe"],
  "members": [
    {
      "username": "test",
      "value": 9967960066,
      "display": "Test User"
    },
    {
      "username": "jdoe",
      "value": 9967960068,
      "display": "John Doe"
    },
    {
      "username": "jadoe",
      "value": 9967960069,
      "display": "Jane Doe"
    }
  ]
}

Create a Group

Creates a new group with optional initial members.

Request

POST /pubapi/v2/groups

Request Body

FieldTypeRequiredDescription
displayNamestringYesName of the group
membersarrayNoArray of user objects to add as initial members
members[].valueintegerNoGlobally unique user ID
ownersarrayNoList of Egnyte usernames to set as group owners (e.g. ["jsmith"]). Use the local username only — no domain suffix. Each user must exist, be active, non-guest, and have group management privileges. If omitted, the API caller becomes the owner. The caller must be an admin or have group management privileges to use this field.

Example Request

curl -i -X POST "https://{domain}.egnyte.com/pubapi/v2/groups" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
     -d '{
  "displayName": "API Test",
  "members": [
    {
      "value": "{userId1}"
    },
    {
      "value": "{userId2}"
    }
  ]
}'

Response

201 Created

Returns the created group object with the same structure as Show Single Group.

Note: The owners field is not included in the response, even if it was set in the request.

Example Response

{
  "schemas": ["urn:scim:schemas:core:1.0"],
  "id": "f9366462-7070-4adb-b866-9a953527507b",
  "displayName": "API Test",
  "members": [
    {
      "username": "jdoe",
      "value": 9967960068,
      "display": "John Doe"
    },
    {
      "username": "jadoe",
      "value": 9967960069,
      "display": "Jane Doe"
    }
  ]
}

Full Update to a Group

Overwrites all attributes of a group. This replaces the entire group configuration, including membership.

Request

PUT /pubapi/v2/groups/{group_id}

Path Parameters

ParameterTypeRequiredDescription
group_idstringYesGlobally unique group ID

Request Body

FieldTypeRequiredDescription
displayNamestringYesName of the group
membersarrayNoArray of user objects. Omitting this field removes all members.
members[].valueintegerNoGlobally unique user ID
ownersarrayNoList of Egnyte usernames to add as group owners (e.g. ["jsmith"]). Use the local username only — no domain suffix. Each user must exist, be active, non-guest, and have group management privileges. This field adds to the existing owners — it does not replace them. The caller must be an admin or have group management privileges to use this field.

Example Request

curl -i -X PUT "https://{domain}.egnyte.com/pubapi/v2/groups/{groupId}" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
     -d '{
  "displayName": "Engineering",
  "members": [
    {
      "value": "{userId1}"
    },
    {
      "value": "{userId2}"
    }
  ]
}'

Response

200 OK

Returns the updated group object with the same structure as Show Single Group.

Example Response

{
  "schemas": ["urn:scim:schemas:core:1.0"],
  "id": "a1004249-5e29-438f-ad72-b4e90af14ee7",
  "displayName": "Engineering",
  "members": [
    {
      "username": "jdoe",
      "value": 9967960068,
      "display": "John Doe"
    },
    {
      "username": "jadoe",
      "value": 9967960069,
      "display": "Jane Doe"
    }
  ]
}

Partial Update to a Group

Updates specific attributes of a group without overwriting the entire configuration. Use this to rename a group, add members, or remove members incrementally.

Request

PATCH /pubapi/v2/groups/{group_id}

Path Parameters

ParameterTypeRequiredDescription
group_idstringYesGlobally unique group ID

Request Body

FieldTypeRequiredDescription
displayNamestringNoNew name for the group
membersarrayNoArray of user objects to add or remove
members[].valueintegerYesGlobally unique user ID
members[].operationstringNoSet to delete to remove the user. Omit to add the user.
ownersarrayNoList of Egnyte usernames to add as group owners (e.g. ["jsmith"]). Use the local username only — no domain suffix. Each user must exist, be active, non-guest, and have group management privileges. This field adds to the existing owners — it does not replace them. The caller must be an admin or have group management privileges to use this field.

Examples

Rename the Group

curl -X PATCH \
  -H "Authorization: Bearer 68zc95e3xv954u6k3hbnma3q" \
  -H "Content-Type: application/json" \
  -d '{"displayName": "Sales"}' \
  "https://apidemo.egnyte.com/pubapi/v2/groups/a1004249-5e29-438f-ad72-b4e90af14ee7"
curl -i -X PATCH "https://{domain}.egnyte.com/pubapi/v2/groups/{group_id}" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
     -d '{
  "displayName": "Sales"
}'

Add a User to the Group

curl -X PATCH \
  -H "Authorization: Bearer 68zc95e3xv954u6k3hbnma3q" \
  -H "Content-Type: application/json" \
  -d '{
    "members": [
      {"value": 9967960066}
    ]
  }' \
  "https://apidemo.egnyte.com/pubapi/v2/groups/a1004249-5e29-438f-ad72-b4e90af14ee7"
curl -i -X PATCH "https://{domain}.egnyte.com/pubapi/v2/groups/{group_id}" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
     -d '{
  "members": [
    {
      "value": 9967960066
    }
  ]
}'

Remove a User from the Group

curl -X PATCH \
  -H "Authorization: Bearer 68zc95e3xv954u6k3hbnma3q" \
  -H "Content-Type: application/json" \
  -d '{
    "members": [
      {
        "operation": "delete",
        "value": 9967960066
      }
    ]
  }' \
  "https://apidemo.egnyte.com/pubapi/v2/groups/a1004249-5e29-438f-ad72-b4e90af14ee7"
curl -i -X PATCH "https://{domain}.egnyte.com/pubapi/v2/groups/{group_id}" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
     -d '{
  "members": [
    {
      "operation": "delete",
      "value": 9967960066
    }
  ]
}'

Set Group Owner(s)

curl -X PATCH \
  -H "Authorization: Bearer 68zc95e3xv954u6k3hbnma3q" \
  -H "Content-Type: application/json" \
  -d '{"owners": ["jsmith"]}' \
  "https://apidemo.egnyte.com/pubapi/v2/groups/a1004249-5e29-438f-ad72-b4e90af14ee7"
curl -i -X PATCH "https://{domain}.egnyte.com/pubapi/v2/groups/{group_id}" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
     -d '{
  "owners": [
    "jsmith"
  ]
}'

Response

200 OK

Returns the updated group object with the same structure as Show Single Group.

Example Response

{
  "schemas": ["urn:scim:schemas:core:1.0"],
  "id": "a1004249-5e29-438f-ad72-b4e90af14ee7",
  "displayName": "Example",
  "members": [
    {
      "username": "jdoe",
      "value": 9967960068,
      "display": "John Doe"
    },
    {
      "username": "jadoe",
      "value": 9967960069,
      "display": "Jane Doe"
    }
  ]
}

Delete a Group

Permanently deletes a group.

Request

DELETE /pubapi/v2/groups/{group_id}

Path Parameters

ParameterTypeRequiredDescription
group_idstringYesGlobally unique group ID

Example Request

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

Response

200 OK

No response body. A successful deletion returns an empty response.


Error Codes

StatusErrorDescriptionResolution
400STARTINDEX_WRONG_VALUEStart index parameter is less than 1Use an integer value of 1 or greater for startIndex
400USER_NOT_FOUNDUser with the specified ID does not existVerify the user ID is correct and the user has not been deleted
400INVALID_USER_NAMEowner (USERNAME) does not exist or has an invalid formatThe value in owners must be a valid, existing Egnyte username. Use the local username only — no domain suffix (e.g. "jsmith", not "jsmith@company.com").
400owner.must.have.group.management.privilegesowner (USERNAME) must have Group Management PrivilegesThe specified owner must have group management privileges in Egnyte.
403user.unauthorizeduser (CALLER) is not authorized to manage resourcesTo set a group owner, the API caller must be an admin or have group management privileges.
400Standard User cannot be group owner.The specified owner is a guest userOnly active, non-guest users with group management privileges can be set as group owners.
400Inactive User cannot be group owner.The specified owner is inactive or deactivatedOnly active users can be set as group owners. Reactivate the user or choose a different owner.
404GROUP_NOT_FOUNDGroup with the specified ID does not existVerify the group ID is correct and the group has not been deleted
409ERROR_DUPLICATE_GROUP_NAMEA group with the same name already existsUse the List Groups endpoint to find the existing group, or choose a different name

Code Examples

GET /pubapi/v2/groups

curl -i -X GET "https://{domain}.egnyte.com/pubapi/v2/groups" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

POST /pubapi/v2/groups

curl -i -X POST "https://{domain}.egnyte.com/pubapi/v2/groups" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
     -d '{
  "members": [
    {
      "value": 9967960066
    }
  ]
}'

PATCH {url}/{group_id}

curl -i -X PATCH "{url}/{group_id}" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
     -d '{
  "members": [
    {
      "value": 9967960066
    }
  ]
}'