Use this API request to replace user details, such as removing workspace entitlements. If you don't enter an entitlement, the user is removed from any associated workspaces.
This enables automated user provisioning, so new users can be created in Anaplan and assigned to the correct workspaces from an identity-management system.
Parameters
The request must include select parameters that identify the user and their entitlements:
User attributes
| Attribute | Details |
id | The Anaplan unique ID for the resourceType |
userName | The email login. Example: peter.smith@example.com |
externalId | Your unique id for this user (as stored in your company systems). Example: Barbara Jensen |
name.formatted | The formatted name (for informational purposes only. It is not stored or searchable). Example: b.jensen |
name.givenName | The first name |
name.familyName | The last or family name |
displayName | The displayName (for informational purposes only. It is not stored or searchable). Example: b.jensen |
Entitlements
An entitlement allows a User to access a Workspace. There are three types are supported:
WORKSPACE
This is the ID of the workspace in an array of entitlement records.
This is the preferred way to manage workspaces a user has access to. It uses an array of complex objects, each one of the type WORKSPACE. Either value (workspace id) or display (workspace name) can be used. It is always returned if the user has access to workspaces, even if the type is not included in the request.
To add an entitlement to a user, based on the workspace, use these parameters:
| Parameter | Details |
type | Indicates the type of Entitlement (WORKSPACE for this type) |
value | The id of the resource (workspace) Example: 6edb50156273d29050001 |
display | The name of the workspace. Example: Finance Workspace |
primary | The SCIM specification requires a primary attribute on arrays. At Anaplan there is no concept of primary entitlement. You will see it on the first item in the array, it is not stored and has no meaning. Example: True |
WORKSPACE_IDS
A comma-separated list of workspace IDs in a single entitlement record.
Usually provided for integrations that don't support arrays of complex objects. It uses a single entry with a comma-delimited list of workspace IDs. It is always returned if the user has access to workspaces, even if the type is not included in the request.
To add an entitlement to a user, based on the workspace IDs, use these parameters:
| Parameter | Details |
type | Indicates the type of Entitlement (WORKSPACE_IDS for this type) |
value | For WORKSPACE_IDS, a comma delimited list of workspace GUIDsExample: 6edb50156273d29050001, 22222 |
WORKSPACE_NAMES
A comma-separated list of workspace names in a single entitlement record.
This is provided for integrations that don't support arrays of complex objects. Uses a single entry with a list of workspace names separated by commas. If the user has access to workspaces, the name of the workspace will always be returned, even if the name was not included in the request.
To add an entitlement to a user, based on workspace names, use these parameters:
| Parameter | Details |
type | Indicates the type of Entitlement (WORKSPACE_NAMES for this type) |
value | For WORKSPACE_NAMES, a comma delimited list of workspace names. Each workspace name needs to be inside escaped double quotes.Example: \"Finance\", \"Marketing\" |
Method and endpoint
/users
Example using WORKSPACE
PUT /Users
Host: https://api.anplan.com/scim/1/0/v2
Accept: application/scim+json
Content-Type: application/scim+json
{
"schemas":["urn:ietf:params:scim:schemas:core:2.0:User"],
"userName":"bjensen@company.com",
"externalId":"bjensen",
"active": "True",
"name":{
"formatted":"Barbara Jensen",
"familyName":"Jensen",
"givenName":"Barbara"
},
"displayName": "Barbara Jensen",
"entitlements":[
{
"value": "6edb50156273d29050001",
"display": "Finance Workspace",
"type":"WORKSPACE"
}
{
"value":"6edb50156273d29050002",
"display": "Sales Workspace",
"type":"WORKSPACE"
}
]
}
Example using WORKSPACE_IDS
PUT /Users
Host: https://api.anplan.com/scim/1/0/v2
Accept: application/scim+json
Content-Type: application/scim+json
{
"schemas":["urn:ietf:params:scim:schemas:core:2.0:User"],
"userName":"bjensen@company.com",
"externalId":"bjensen",
"active": "True",
"name":{
"formatted":"Barbara Jensen",
"familyName":"Jensen",
"givenName":"Barbara"
},
"displayName": "Barbara Jensen",
"entitlements":[
{
"value":"6edb50156273d29050001,67890",
"type":"WORKSPACE_IDS"
}
]
}
Example using WORKSPACE_NAMES
PUT /Users
Host: https://api.anplan.com/scim/1/0/v2
Accept: application/scim+json
Content-Type: application/scim+json
{
"schemas":["urn:ietf:params:scim:schemas:core:2.0:User"],
"userName":"bjensen@company.com",
"externalId":"bjensen",
"active": "True",
"name":{
"formatted":"Barbara Jensen",
"familyName":"Jensen",
"givenName":"Barbara"
},
"displayName": "Barbara Jensen",
"entitlements":[
{
"value": "\"Finance\",\"Sales\"",
"type":"WORKSPACE_NAMES"
}
]
}
Response
HTTP/1.1 200 OK
Content-Type: application/scim+json
Location: https://api.anaplan.com/scim/1/0/v2/Users/2819c223-7f76-453a-919d-413861904646
{
"schemas":["urn:ietf:params:scim:schemas:core:2.0:User"],
"id":"2819c223-7f76-453a-919d-413861904646",
"externalId":"bjensen",
"active": "True",
"meta":{
"resourceType":"User",
"created":"2011-08-01T21:32:44.882Z",
"lastModified":"2011-08-01T21:32:44.882Z",
"location":
"https://api.anaplan.com/scim/1/0/v2/Users/2819c223-7f76-453a-919d-413861904646",
"version":"W\/\"e180ee84f0671b1\""
},
"name":{
"formatted":"Barbara Jensen",
"familyName":"Jensen",
"givenName":"Barbara"
},
"displayName": "Barbara Jensen",
"userName":"bjensen"
"entitlements":[
{
"display": "Finance Workspace",
"value": "6edb50156273d29050001",
"type": "WORKSPACE",
"primary": true
},
{
"value": "6edb50156273d29050001",
"type": "WORKSPACE_IDS"
},
{
"value": "Finance Workspace",
"type": "WORKSPACE_NAMES"
}
]
}