Set user roles and Secutiry Group in REST

Hi to all,
is it possible to accomplish this?

I’m importing accounts directory and contacts from my ERP with REST.

I would like to set roles ans security groups of these items in order to limit the type of records imported.

Thank you

In theory it should work as long as the role and SecurityGroup already exists. You just need to do an add_relationship for the user to both the ACLRoles module and the SecurityGroups module.

For making it easier to maintain you can also just assign the role directly to the SecurityGroup and then you would only need to assign a role to a user via REST for your one-off cases.

Thank you


You can use set_relationships call to crate relationship.