We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Trigger Table API from Scripted REST API from the same instance

kikiran
Kilo Contributor

Hi All,

I am trying to trigger a Table API GET call from scripted REST API by impersonating a user. This is for an integration with an application which is authenticated by oauth profile. I would only get Table API URL in the request (with table name, sys_id of record and user's email). 

This GET call is currently returning records for which the requesting user does not have access to. I am trying to restrict this by exposing a Scripted REST API, where I would be impersonating the user and then trigger the same Table API. But, this call requires user's credentials which I dont have(ex. password).

Can anyone help me how to proceed in this scenario?

Thanks,

Kiran

5 REPLIES 5

kikiran
Kilo Contributor

I have to extend this to query all the APIs exposed currently. This will include PUT/POST/DELETE table APIs and also other scripted rest APIs, which will be a heavy customisation if I have to take it up this route?? Most common use case would be to be able to approve/reject a ticket from the portal.