Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
I need help on deleting all the user assigned group programmatically and assign him to new group set on logging In.
Solved! Go to Solution.
Hi Aakash D,
Sushant Pandey already answered your query.
Let me give you an example; to add a User to Developer Group we can use following code:
var params = {
member: "UserNameHere" /* STRING */,
type: "User" /* STRING */
};
// no return
Groups["Developers"].AddMember(params);
Hi Aakash D,
Could you please share your usecase in more detail. Are you using any ActiveDirectory for Authentication or are you using any custom Authenticator?
Hi Ankit Gupta,
My process is actually after authentication, I will get the logged in user but I couldn't add the user to the respective user group dynamically.Is there a way through services in Thing
Hi Aakash D,
Sushant Pandey already answered your query.
Let me give you an example; to add a User to Developer Group we can use following code:
var params = {
member: "UserNameHere" /* STRING */,
type: "User" /* STRING */
};
// no return
Groups["Developers"].AddMember(params);
Aakash have you already checked the default services available under Organization, Groups and even for individual users. Like for a particular Group you have services like AddMember(), AssignMembers(), DeleteMembers() and you'll see similar ones for Organization as well.