2

I have a native iOS application that uses a standard OAuth flow to authenticate to the Salesforce REST API and fetch data for offline viewing. I have a requirement in the app for one user to be able to occasionally impersonate another user and fetch their data. (This might be for support team use or if one user is covering another's accounts while they are on vacation, etc). The impersonating user doesn't and shouldn't have the username and password of the user they need to impersonate.

Similar to the "Log In as another user" admin feature in Salesforce web, is it possible to obtain an access token on behalf of another user?

0

The only impersonation options found in the developer guides are for SOAP API. .

Release of Sprint '18, has an option to delete field history and audit trail data.

Until this feature is implemented, you may be better off creating a custom REST API and encapsulate the rules for your scenario within that endpoint. Here is a sample from Salesforce that may help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.