"User Not Authorized" when trying to use XML/CSV export directly from URL

Lukasz_Krzaczko
Giga Expert

I'm using SwissNow function to export records from multiple tables to a sinble XML file, like here:

https://community.servicenow.com/community?id=community_article&sys_id=e914feeadb38a3c4e0e80b55ca961...

I'm getting an error when trying to use XML URL export. When I try to open some custom tables with XML or CSV Processor ("&XML" in the URL), I get "User Not Authorized". When I open the same table in list view, it displays all the data. As I noticed, this is happening only for some custom tables - not all.

Do you know what can be wrong here? I suspect, it's the "Referer" header that is checked, but why only for some tables?

1 ACCEPTED SOLUTION

Lukasz_Krzaczko
Giga Expert

I got a response from ServiceNow - the problem was the "Allow access to this table via web services" checkbox on table dictionary entry. When it is checked, everything works fine.

View solution in original post

4 REPLIES 4

David Stutter
Tera Guru

The best approach would be the activation of "Debug security", you can see the security rules which are failing.

Maybe the processor /sys_processor.do?sys_id=7c161ea00a0a0b0800ebcc6f27ec5a64

or sys_id=7ca7de830a0a0b8b01a528bda8a3b3aa is not accessable for this user.

 

There is a sys_property to enable export debug log.

https://docs.servicenow.com/bundle/london-platform-administration/page/administer/exporting-data/concept/c_EnableExportDebugLogging.html

I will have a look into export debugging. The problem with this issue is that the same user can export some of the tables, while others return "User not Authorized".

I checked logs and security rules - nothing is failing there 😞 When I put "Referer" header in the request, it all starts working - but this workaround is not usable for the end users.

Lukasz_Krzaczko
Giga Expert

I got a response from ServiceNow - the problem was the "Allow access to this table via web services" checkbox on table dictionary entry. When it is checked, everything works fine.