Add role to user based on input in catalog item

Souvick6917
Tera Contributor

Hello All, 

I have a requirement where I want to add users automatically to group to grant admin and other access. Now this process, I want to achieve through catalog item. Challenge is that there are multiple instances for DEV, INT, UAT, PROD. All the roles for different instance should be done form one single catalog item. A drop down variable containing the instance names and when selected they will add accordingly.

I need help on achieving this.

 

Regards

Souvick

5 REPLIES 5

Amit Verma
Kilo Patron
Kilo Patron

Hi @Souvick6917 

 

You can orchestrate this process via Flow Designer. Inside the flow, you can use Table REST API to add users to the respective groups. Refer https://www.servicenow.com/community/developer-forum/how-to-add-users-in-group-through-scripted-rest...

https://www.servicenow.com/community/developer-forum/adding-users-to-group-via-the-api/m-p/1432636/p...

 

Thanks and Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

Ankur Bawiskar
Tera Patron
Tera Patron

@Souvick6917 

so from current instance you want to give user role to possibly DEV or UAT etc instance?

If yes then you will have to integration current instance with other instances so that you can create record into sys_user_has_role table

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

@Souvick6917 

Hope you are doing good.

Did my reply answer your question?

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

@Souvick6917 

If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.

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