Update User Division

Hello,

I'm trying update the user division using User update api at ApiExplorer, I receive a 200 OK but in Genesys Cloud the value is not change.

I tried sent division name, division id and the return is the same.

API Used: https://developer.genesys.cloud/api/rest/v2/users/#patch-api-v2-users--userId-

Someone help me?

Per the documentation for PATCH /api/v2/users/{userId}, the division is not settable in that request; only documented properties should be expected to work. You can use POST /api/v2/authorization/divisions/{divisionId}/objects/{objectType} to set the user's division, using the value USER for objectType and the body containing the user's ID.

Hi

You can update a user's division using PATCH with the body of your request as follows:

{
  "schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User",
    "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User",
    "urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User"
  ],
  "Operations": [
{
  "op": "replace",
  "value": {
      "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
       "division": "Operations"
   }
  }
}
  ]
}

Curl command would be like:

curl --location --request PATCH 'https://api.mypurecloud.com.au/api/v2/scim/users/272147f-b176-4c9d-813e-11cb2b16a2' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 8SAI5QCxxxxxxxxxxxxxxxxxxxxxxzuQ' \
--data-raw '{
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:User",
        "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User",
        "urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User"
  ],
  "Operations": [
    {
      "op": "replace",
      "value": {
          "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
        "division": "Operations"
    }

      }
    }
  ]
}'

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.