cannot export all roles from sys_user_role table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2022 01:41 AM
Hi there,
I am trying to export the sys_user_role table. In the table there are 1194 records, however when I export I only get 1187 records (note that I am logged on with admin and have Elevated Roles) . There are obviously some rows that I cannot export due to security constraints but does anyone know how I can find out what these are?
This is for Audit so need an explanation!
Thanks for your help.
Amanda

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2022 01:43 AM
Hi there,
Don't know your instance ofcourse. Though it could be roles which you don't have access to as admin and also not as security_admin. For example sn_hr_core.admin, if you don't have the appropriate HR roles, then you can't see that role.
Just wondering, what's the reason for exporting all roles?
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020-2022 ServiceNow Community MVP
2020-2022 ServiceNow Developer MVP
---
LinkedIn
Community article, blog, video list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2022 01:48 AM
Hi,
why do you wish to export the roles?
Are you trying to export in XML or Excel etc?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2022 02:45 AM
Thank you, it's for an external audit. The roles I have extracted (by CSV file) and sent to auditors dont match the number of roles in the sys_user_role table on ServiceNow. So I have a discrepancy, I do have the sn_hr_core.admin role so that is not the restriction.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2022 02:53 AM
Did you identify which roles were skipped?
any query business rule on sys_user_role which is restricting those?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader