ObsTech | 2023-04-28 18:58:01 UTC | #1
Hello, I am attempting to use the patch user to update a users groups but even though it runs successfully it I cannot seem to add groups to the user. I tried not changing groups and simply updating the email, which works with out any issues. But for some reason I cant seem to get the groups to update.
body = PureCloudPlatformClientV2.UpdateUser() body.groups = sourceuser.groups body.version = receivinguser.version patchuser = usersapi.patchuser(receivinguser_id, body=body)
I'm attempting to write something that will copy groups from one user and apply it to the second. I have tried using the information that comes back from a usersapi.getuser SDK call with expanded groups, as well as taking the id's from that call and getting a group listing with the groupsapi.getgroups SDK call.
The patch call returns successfully and updates the user version but has no effect on the users groups.
tim.smith | 2023-04-28 19:18:01 UTC | #2
You can verify that the request contains the data you think it does by logging your body variable as json. If the request looks as you expect, containing the correct group information, please open a case with Genesys Cloud Care to investigate the apparent silent failure to update the groups.
system | 2023-05-29 19:18:17 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 19690