How to add multiple memberships to multiple users

Hello,
I am working on developing a membership assignment process.
admin can create multiple memberships of multiple users.

Until now, I couldn’t find a proper API regarding the function.
Identity API is working with one user and one membership each.
I created a SQL connector and send query statement parameter to implement.
It is working well. However, I need to manipulate the table and put some dummy data.

I am wondering if there is another way to integrate this request, for example, used by API.
Would you give me some idea to deploy this task?
Any idea would be appreciated.
Thanks in advance.

Hello,

Here you have an example of how to use the Identity API to manage users and groups . You can add multiple memberships to a user (combination of a specific group and role).

best

Thank you for your comment.
I am still struggling to use Identity API to manage users and groups.
I couldn’t find a way to add multiple memberships to a user at one time.
I want to add multiple memberships to multiple users at the same time.
Can I get more information about this?
Thanks in advance.

Hi,

I think the only way to do that is by calling several times the addUserMembership or addUserMemberships (to add a membership to a multiple users) methods in the IdentityAPI

best

Thank you for your help.
I am going to try to do what you suggested.
Best