Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

How to restrict certain table attachments for 3rd party integration

Gayathri Adoni
Tera Expert

Hi,

 

We have requirement where 3rd party hits ServiceNow and wants to read attachments and attachment docs for Incident and change table and not for other tables.

 

For this I have created a custom read ACL on Attachment table by restricting specific table, since there are many OOB ACLs on attachment table, OOB Acl passing them and giving access to other table attachments without even reaching to my custom ACL. I can't deactivate OOB Acl as there are many and cant modify them because it will cause issues during upgrade.

 

With before Query BR I can restrict but it will impact on users' performance. Please do let me know are there any other way we can achieve this? 

Thanks in advance

 

 

 

 

3 REPLIES 3

Ankur Bawiskar
Tera Patron

@Gayathri Adoni 

but why not use Scripted REST API instead of OOTB Table API or Attachment API?

Scripted REST API can handle this restriction as you can write script there

I won't recommend any other API

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Gayathri Adoni
Tera Expert

@Ankur Bawiskar 
Hi,

 

Just for attachments table you are suggesting to create scripted rest api. For remaining tables read access I can use table API? 

Can we use table api and scripted rest api both for this inbound integration?

 

 

@Gayathri Adoni 

even for accessing table data directly exposing OOTB Table API is not recommended as 3rd party can access every field and record, may be something which they are not supposed to view

So better go with scripted rest api for both getting table data and attachment data.

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader