Showing "User Not Authorized" error while exporting to excel/csv from portal widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2023 05:33 AM - edited 01-23-2023 06:04 AM
I have widget "Data Table from Instance Definition" on CSM portal.
I have added filter as "Sys_id is one of javascript:new global.caseManagmentUtils().getMyCase();"
Script include is fetching sys_id of records.
Customer user have access to case table.
Refer below screenshot.
Record are visible but, while exporting as excel/CSV, customer is getting below error
Export works when I add normal filter, but my requirement is not satisfying with normal filter, for that reason script include is created. How do I resolve this issue ?
Is there something that I missed ?
@Community Alums
Thanks in advance.
- Labels:
-
Customer Service Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2023 07:04 PM
Is it working fine with admin user?
any query BR is restricting the records?
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-29-2024 08:55 AM
Hi @Ankur,
I'm also facing same issue in service portal, I'm able to export PDF and Excel but not for CSV. While selecting CSV I'm getting "
User Not Authorized"
this message. I do have admin rights still. can you please guide me on this. PFA screen shot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2023 07:43 PM
When you export with the normal filter, are you logged in as the same user?
Can you paste the URLs you are directed you when you export with the normal filter as well as the filter using the script include?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2023 04:45 AM
Hi @Omkar Ranjane,
We usually face those issues when we are doing export for Excel & CSV types because of some roles & ACLs.
"User Not Authorized" error is only due to ACL & you need to work on ACLs on that table that you are exporting. So you can enable the Security Dubg > Enable All.
And, give the necessary role to that particular ACL which is failing. It helped me this way too.
Please mark my answer as Accepted Solution & helpful if this suffice this requirement.
BR, Sohith