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

How can i delete a user assigned to various groups when he logged in and add him to respective group assigned from an external system dynamically?

aakash.d2
1-Visitor

How can i delete a user assigned to various groups when he logged in and add him to respective group assigned from an external system dynamically?

I need help on deleting all the user assigned group programmatically and assign him to new group set on logging In.

ACCEPTED SOLUTION

Accepted Solutions

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);

View solution in original post

4 REPLIES 4

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);

supandey
19-Tanzanite
(To:aakash.d2)

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.

Announcements


Top Tags