How do I give the ability to modify (add or remove users) groups to one ITIL user

Deepika Gangra1
Tera Expert

Hi Everyone,

I want to give the ability to modify (add or remove users) groups to one ITIL user. Please help me with the best practice way.

 

Thanks in advance.

Deepika 

1 ACCEPTED SOLUTION

palanikumar
Mega Sage

Grant user_admin role to the user where you want to grand user administration access. 

 

Thank you,

Palani

Thank you,
Palani

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@Deepika Gangra1 

this link has explanation about the ACL modifications

How to configure Group Members (sys_user_grmember) edit capability, so that only the Group Manager i... 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur.

Thanks for reply. I have gone through this but it didn't worked for me. could you help me with further details to achieve this?

 

Thanks

Deepika Gangrade

Shahid3
Tera Contributor

Hi Deepika,

 

The recommendation is to use a service catalog for managing groups and membership. In this way anyone can requests for the changes, group managers can be the approving authority and in backend 'Flow' Actions can do the required needful.

 

Here is an article describes more on the action you can take on flow.

 

https://www.servicenow.com/community/now-platform-forum/automate-adding-members-to-group/m-p/1107761...

 

I created an action called "Create Group":

Shahid3_0-1695042299691.png

 

 

and below is the script:

(function execute(inputs, outputs) {

//*** Create group ***//
var grp = new GlideRecord('sys_user_group');
grp.initialize();
grp.name = inputs.name;
grp.manager = inputs.manager;
grp.type = inputs.type;
var groupId = grp.insert();

//*** Add ITIL role to the group *** //
if(groupId){
var grRole = new GlideRecord("sys_group_has_role");
grRole.initialize();
grRole.group = groupId;
grRole.setValue("role","9aaaa632844fa400c50c3aed6c7cc667"); //itil
grRole.setValue("inherits",true);
grRole.insert();

}

// *** Add members *** //
var grmem = new GlideRecord('sys_user_grmember');
var usr = new GlideRecord('sys_user');
usr.addQuery("sys_id","IN",inputs.members);
usr.query();
while(usr.next()){
grmem.initialize();
grmem.group = groupId;
grmem.user = usr.sys_id;
grmem.insert();
}

})(inputs, outputs);

 

https://www.servicenow.com/community/now-platform-forum/automate-adding-members-to-group/m-p/1107761

 

Regards

Shahid

palanikumar
Mega Sage

Grant user_admin role to the user where you want to grand user administration access. 

 

Thank you,

Palani

Thank you,
Palani