Impersonation in a scripted REST API

Mike50
Kilo Guru

Hello Community,

 

I came across an issue when developing the scripted REST API (global scope).

Dedicated User account is used for the integration purposes, however, I need to be able to impersonate other Users via script, so that specific actions are triggered by those Users.

This works perfectly if integration User is granted the 'admin' Role. However, it does not work (impersonation is not successful) when 'impersonator' Role is used instead.

 

Can you please advise if it is possible to impersonate other User via scripted REST API without granting the 'Admin' Role to the integration User? How to achieve this?

 

Thank you in advance for your help.

1 ACCEPTED SOLUTION

Mike50
Kilo Guru

I found another thread that contains answer to my question.

Scripted REST API can trigger Script Action via Event.

As Script Action is executed by the system, impersonation is possible.

View solution in original post

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@Mike50 

what are those specific actions?

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

@Ankur Bawiskar,

any actions, this should not matter. I have already found an answer to my question and I will post it.

Mike50
Kilo Guru

I found another thread that contains answer to my question.

Scripted REST API can trigger Script Action via Event.

As Script Action is executed by the system, impersonation is possible.

Community Alums
Not applicable

Hello

Could you please Share the link to the article that helped? Thanks

Regards

Pradeep