impersonate using table API

Steve42
Tera Expert

I need to know if there is a way without doing a scripted REST API to use the table API to attach a file and impersonate a user so it shows the impersonated user attached the file?

 

4 REPLIES 4

marcguegueniat
Kilo Sage

Hello,

Kind of. If the system sending the REST WS call uses the credentials (login/pwd) of a user, then the attachment will be displayed as created by this user.

However, if system sending the call uses its own credentials, then no, there is no way to mark attachement as created by someone else, as part of OOTB. You will have to go with a scripted API.

Regards,

 

Steve42
Tera Expert

We are going to use a scripted API, Thanks

If that's the case, check out the GlideImpersonate() class. There is an impersonate() method that takes a sysID as an argument.

Thanks Chuck I'll give that a shot!