Displaying PDF's on a ServiceNow Portal to Unathenticated users

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2025 08:35 AM
We are looking to display pdf attachments that are located on the sys_attachement table on a portal that is available to unauthenticated users.
This portal is a public website and we require that the pdf is rendered in the page, and the user is not required to download the file or navigate to a new window (popup, new tab, etc).
One of the solutions mentioned was to use an iframe but this is not ideal as it would weaken the security on the site and it still will not allow for files from the sys_attachment table to be rendered.
Has anyone attempted anything similar to this or have a recommendation as to how we might achieve this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2025 11:15 PM
everything within ServiceNow is shown based on authentication and access controls.
I don't think your requirement is feasible as access would be required for sys_attachment table and iframe is not an ideal way as it may allow attackers to inject any script and will weaken
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
04-25-2025 05:11 AM
I agree with the entirety of what you have said. I am mainly looking to see if anyone has been able to render PDF's (in any way) on the portal without forcing a download or moving to a new tab/window.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2025 05:35 AM
Without download should work if you use document viewer in your instance
you can use URL like this and include view=true in URL
/nav_to.do?uri=sys_attachment.do?sys_id=fa615af2db573b001c1d468b3a9619fc&view=true
Without authentication it's not possible to show attachment to user.
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
04-27-2025 07:16 AM
Thank you for marking my response as helpful.
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