Is there a way to provide admin & security_admin role to the users using rest integration.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2025 01:58 AM
Use Case:
Whenever a user requests access from PROD to DEV for admin or security admin roles, the flow should automatically assign the requested roles to the user.
The setup is already in place and works correctly for other roles.
Issue:
- For the admin role, the flow creates an empty record — the user and group Fields are not populated.
- For the security admin role, the flow throws the following error:
Error: Operation Failed
Details: Error during insert of sys_user_grmember (test user)
(Process Automation.19602fa1890b261025214ad7e9572531; line 😎
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2025 02:36 AM
Ah ok and does your integration user have the security admin assigned to them?
As security admin role must be assigned by another security admin, can you please verify this?
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2025 03:48 AM
Yeah, the integration user is already assigned to the role.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2025 04:14 AM
are you adding the user to some group?
the error tells it fails for sys_user_grmember and doesn't talk about role
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2025 04:27 AM
Some ideas:
- try assigning the role manually
- does it work without error?
- is the sys ID same for PROD and the other (TEST)?
Please @Prithvi Ramesh1 can you share some of your script or configurations? We see only the error as outcome but not what is happening before it..
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2025 06:58 AM
Here are the configuration screenshots for your reference:
We are passing the user and group sysIds as an input
Rest Step -
Script Step -
Script -
Output Variable -
Error -