cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Users API

AP_9587236
17-Peridot

Users API

1. What API used to add user to usergroup in thingworx?

2. And approximately how many usergroups can be added to one usergroup?

1 REPLY 1

@AP_9587236 

 

You can use below code to add users to a user group or a user group to a user group,

// Adding a user (testUser) to a user group (DevGroup)
var params = {
member: "testUser" /* STRING */,
type: "User" /* STRING */
};
Groups["DevGroup"].AddMember(params);


// Adding a user group (DevGroup) to another user group (Administrators)
var params = {
member: "DevGroup" /* STRING */,
type: "Group" /* STRING */
};
Groups["Administrators"].AddMember(params);

 

I don't think there is any limit defined for number of users groups that can be added to a user group.

 

Regards,

Sachin

Top Tags