Expand my Community achievements bar.

Do you have questions about the migration to Adobe Business Platform? Come join our upcoming coffee break and ask away!
SOLVED

Update Other Groups in User Object

Avatar

Level 7

I am trying to add newly created groups to the 'Other Groups' field in the user profiles for 350+ users. I have not been able to find the correct API call or Workfront module to do this. Could someone help me get started with this please?

Note: I'm not trying to replace/delete the existing groups in the other groups, just want to add the new ones.

Example:

IDAdd to Other Groups
User1CS-SE
User2CS-SE
User3CS-TS
User4CS-LSA
User5CS-SE
User6CS-LSA
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
  1. Pull in current userGroups array of collections for user
  2. Create array of collections for groups you want to add, JSON should look like this (or similar, I did this off memory, sorry):

 

{
  "userGroups":[
    "groupID": "group ID 1"
    ],[
    "groupID": "group ID 2"
    ]
}

 

  • Merge array from step 1 with array from step 2
  • PUT your new array back on to the user object

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor
  1. Pull in current userGroups array of collections for user
  2. Create array of collections for groups you want to add, JSON should look like this (or similar, I did this off memory, sorry):

 

{
  "userGroups":[
    "groupID": "group ID 1"
    ],[
    "groupID": "group ID 2"
    ]
}

 

  • Merge array from step 1 with array from step 2
  • PUT your new array back on to the user object

Avatar

Level 7

Thanks @ChrisStephens - I was able to merge the arrays. Could you help me with step 4 please? I'm using a PUT call, but I'm not confident if I'm doing it right. I shared a screenshot for the reference below.

Step 3: Merge successful

_Manish_Singh_0-1692128263740.png


Step 4: PUT call, I'm obtaining "4.ID" (user id) from Workfront search module.

_Manish_Singh_2-1692129097552.png

Avatar

Community Advisor

That's not correct.

 

You need a create JSON module, and use the JSON string from my previous comment to make the structure, then map your merged array into the array field, then the JSON string needs to go in the PUT calls body.