How to add users in group through Scripted Rest API ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2023 02:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2023 05:09 AM
You can add them through creating a scripted rest API. You can send the users and group details through JSON and in the script you can retrieve the data and through the script insert the users to the group membership
Regards,
Piyush Sain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2023 06:28 AM
I have created post rest table api in "sys_user_grmember" and added user in group like below
Go to the Rest=> Rest Api explorer and create new POST table api like below
This will create record in sys_user_grmember and user will add in group.
Please check and Mark Helpful and Correct if it will help you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2023 06:41 AM
what's your business requirement?
You can use OOB table API or scripted rest API.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2023 06:51 AM
when they add members in group from source instance so it will reflect in target instance. that is the requirement.