# Edit a user's groups

**URL:** <https://forums.losant.com/t/edit-a-users-groups/5420>\
**Category:** Help\
**Tags:** experience, groups, users\
**Created:** [February 20, 2024, 9:07pm UTC](https://forums.losant.com/t/edit-a-users-groups/5420 "2024-02-20T21:07:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonatas\_Liasch](https://avatars.discourse-cdn.com/v4/letter/j/b3f665/32.png) [@Jonatas\_Liasch](https://forums.losant.com/u/Jonatas_Liasch)\
**Post date:** [February 20, 2024, 9:07pm UTC](https://forums.losant.com/t/edit-a-users-groups/5420/1 "2024-02-20T21:07:35Z")

</div>

hi  
I would like some help, as I couldn’t find a possible solution

I would like to change the groups a user belongs to via workflow, but I couldn’t find a dynamic way to do this  
I read in the documentation that it is possible to change using the User: Update Node block, I managed to change a group, but I needed to change the user and include him in several groups simultaneously.

for example  
I need to change the user and place him in two groups dynamically, how do I tell which groups he will be part of?  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/9/928e1688afd2f6903a218a54bbbcbe5af2132024.png)

is it possible to do that?  
Thanks in advance for your help

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [February 20, 2024, 9:27pm UTC](https://forums.losant.com/t/edit-a-users-groups/5420/2 "2024-02-20T21:27:11Z")

</div>

Hey @Jonatas_Liasch,

Our documentation definitely isn’t very clear on how to do this. You have to select “JSON Template” to dynamically update fields on a user. You can then set the `experienceGroupIds` property to an array of experience group IDs.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/e/e87292682b0bdf488d42e831ff019fe6c60b4a73.png)

If you have an array of group IDs already on the payload, you can use the `jsonEncode` helper to dynamically build the JSON template:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/5/5e396d9e373dddd8eb5c19f16c6e5025776d4a2e.png)

The `experienceGroupIds` property comes from the [Experience User Patch schema](https://docs.losant.com/rest-api/schemas/#experience-user-patch). The JSON template you provide can include any properties found in that schema.

---

<div class="post-metadata">

**Author:** ![Jonatas\_Liasch](https://avatars.discourse-cdn.com/v4/letter/j/b3f665/32.png) [@Jonatas\_Liasch](https://forums.losant.com/u/Jonatas_Liasch)\
**Post date:** [March 5, 2024, 2:38pm UTC](https://forums.losant.com/t/edit-a-users-groups/5420/3 "2024-03-05T14:38:50Z")

</div>

Thank you very much @Brandon_Cannaday  
you helped me a lot 😃 😃 😃
