function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
palerra test 5palerra test 5 

Login-As access not received via REST API

If there is any event related to "Login-As" access then it is seen in SetupAudit Trail however if I query using the REST API, it fails to return this event. What could be missing in the query due to which I don't see this?

Steps followed to see the logged activity:
1.For the Salseforce Admin User followed this path:
Administer-> Security Controls ->View Setup Audit Trail
There its showing all the Logged in using Login-As access for testUserName
in View Setup Audit Trail UI Page

2.When I fired the restAPI Query on workbench
Then I received only Logged out using Login-As access for testUserName.

In rest Explorer i tried
1)
/services/data/v36.0/query?q=SELECT+Action,CreatedById,CreatedBy.Username,CreatedDate,DelegateUser,Display,Id,Section+FROM+SetupAuditTrail+WHERE+CreatedDate+>+2016-07-17T17:45:27Z+ORDER+BY+CreatedDate+ASC+NULLS+FIRST

2)in SOQL
SELECT Action,CreatedById,CreatedDate,DelegateUser,Display FROM SetupAuditTrail ORDER BY CreatedDate DESC NULLS FIRST

If i can view it directly using the View SetupAuditTrail, why is it not returned as part of the REST/SOQL query?

Any help would be appreciated.

Thanks