7

Salesforce has Login History for 6 months, but our requirement is for compliance to see list of Admin user who has logged in as other user by using "Login as a User" for testing i.e. Suppose Admin "A" has logged in our sandbox and for testing logs in as user "U", then I want to know the history having mapping of all Admin user along with associated user they have logged in.

Is it possible to get such data ? If so , can you guide me on how I can achieve this ?

4
  • (I don't actually have an answer for either scenario off the top of my head, BUT...) do you mean you want to do this off existing data: ie. You would like a way to determine the last 6 months of activity. OR do you mean you would like to develop a system that will facilitate this kind of reporting in the future?? Commented Jun 13, 2014 at 14:53
  • I looked at existing data (CSV) file but could not find a log entry when Admin uses "Login as a User", so not sure if its possible via existing data. Also if required I can build a system which captures such logs, but I do not have any starting point or I do not know how I can infer if the user logged in is via "URL" or via "Login as a User". Commented Jun 13, 2014 at 15:15
  • Admins also run unit tests using "RunAs" where the User may or may not exist. Do you want to capture that information as well? Many other things will often run under an admin's credentials even though they personally are not actively involved in what's happening. Outbound mail services they've created would be one example that comes to mind which run even when they're not logged in. Am certain there are many others.
    – crmprogdev
    Commented Jun 13, 2014 at 19:34
  • Runas, however, leaves no impression on the system, because all changes made to data in a test method are rolled back, so that's not really relevant. In fact, the user from runas may have been created in the test method, and wouldn't persist beyond the test method anyways.
    – sfdcfox
    Commented Jun 18, 2014 at 13:32

1 Answer 1

3

You can see this data under Setup > Security Controls > View Setup Audit Trail. It doesn't appear as a login in Login History because it's not an actual login.

1
  • I logged in as User A and did one Feed Post, no entry was created in SetupAudotTrail object Commented May 10, 2016 at 11:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .