/addUsers: Add Users to Group

URL:
https://[root]/community/groups/[groupID]/addUsers
Methods:
POST

Example usage

The following is a sample ArcGIS Online POST request for the addUsers operation:

Use dark colors for code blocksCopy
1
2
3
4
5
6
POST /sharing/rest/community/groups/826ab72ed44c48beb8735c2634e0bfad/addUsers HTTP/1.1
Host: org.arcgis.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

users=drohner,swilson&f=pjson

The following is a sample ArcGIS Enterprise POST request for the addUsers operation:

Use dark colors for code blocksCopy
1
2
3
4
5
6
POST /webadaptor/sharing/rest/community/groups/826ab72ed44c48beb8735c2634e0bfad/addUsers HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

users=drohner,swilson&f=pjson

Description

The addUsers operation allows group owners, group managers, and organization administrators to add users directly to a group without requiring the users to accept an invitation. A maximum of 25 users can be added in one request.

The operation may fail to add users to a group if the users do not have the required privileges to join the group, or if they have reached the maximum number of groups they can participate in (a maximum of 512 groups). Users from outside the organization may also fail to be added to a group if the group has met its limit on adding external members.

Request parameters

ParameterDetails

users

A comma-separated list of usernames to be added to the group as group members.

Example:

Use dark colors for code blocksCopy
1
users=regularusername1,regularusername2

admins

A comma-separated list of usernames to be added to the group as group managers.

Example:

Use dark colors for code blocksCopy
1
admins=adminusername1,adminusername2

f

The response format. The default format is html.

Values: html | json | pjson

Response properties

PropertyDetails

notAdded

A JSON array of usernames that were not added.

JSON Response syntax

Use dark colors for code blocksCopy
1
2
3
4
5
6
{
  "notAdded": [
    "<username1>",
    "<username2>"
  ]
}

JSON Response example

Use dark colors for code blocksCopy
1
2
3
4
5
6
{
  "notAdded": [
    "drohner",
    "swilson"
  ]
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.