Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
1. What API used to add user to usergroup in thingworx?
2. And approximately how many usergroups can be added to one usergroup?
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