Newer Version Available

This content describes an older version of this product. View Latest

LoginAsEventStream (Beta)

Tracks when a Salesforce admin logs in successfully as another user and tracks the admin’s activities. This object is available in API version 44.0 and later.

This object is included in Real-Time Event Monitoring (Beta). As a beta feature, Real-Time Event Monitoring is a preview and isn’t part of the “Services” under your master subscription agreement with Salesforce. Use this feature at your sole discretion, and make your purchase decisions only on the basis of generally available products and features. Salesforce doesn’t guarantee general availability of this feature within any particular time frame or at all, and we can discontinue it at any time. This feature is for evaluation purposes only, not for production use. It’s offered as is and isn’t supported, and Salesforce has no liability for any harm or damage arising out of or in connection with it. All restrictions, Salesforce reservation of rights, obligations concerning the Services, and terms for related Non-Salesforce Applications and Content apply equally to your use of this feature. You can provide feedback and suggestions for this object in the Real-Time Event Monitoring Beta group in the Trailblazer Community.

Note

Supported Calls

describeSObjects()

Supported Subscribers

Subscriber Supported?
Apex Triggers
Flows
Processes
Streaming API (CometD) Yes

Streaming API Subscription Channel

/event/LoginAsEventStream

Special Access Rules

Accessing this object requires the Shield Event Monitoring add-on, and the View Data Leakage Detection Events and API Enabled user permissions.

Fields

Field Details
Application
Type
string
Properties
Nillable
Description
The application name in English. For example, Salesforce Internal Application, or Microsoft SOAP Toolkit.
Browser
Type
string
Properties
Nillable
Description
The browser name and version if known. If no browser or version number is available, “Unknown” is returned. Product names are in English. For example, “Chrome 64”.
DelegatedOrganizationId
Type
string
Properties
Nillable
Description
Organization Id of the user who is logging in as another user. For example, 00Dxx0000001gEH
DelegatedUsername
Type
string
Properties
Nillable
Description
Username of the admin who is logging in as another user. For example, admin@company.com
EventDate
Type
dateTime
Properties
Filter, Sort
Description
The time and date of the event. For example, 2013-01-01T03:01:01Z. Seconds are the most granular setting.
EventIdentifier
Type
string
Properties
Filter, Sort
Description
The unique identifier for each record in LoginAsEvent. Use this field as the primary key in your queries.
LoginAsCategory
Type
picklist
Properties
Nillable, Restricted picklist
Description
Represents how the user logs in as another user. For example, OrgAdmin, or Community.
LoginHistoryId
Type
reference
Properties
Nillable
Description
Tracks a user session so you can correlate user activity with a particular login instance. The ID from the LoginHistory entity associated with this login event. For example, 0Yaxx0000000019.
LoginKey
Type
string
Properties
Nillable
Description
The string that ties together all events in a given user’s login session. The session starts with a login event and ends with either a logout event or the user session expiring. For example, 8gHOMQu+xvjCmRUt.
LoginType
Type
picklist
Properties
Nillable, Restricted picklist
Description
The event’s type of login. For example, “Application.”
Platform
Type
string
Properties
Nillable
Description
The platform name and version that are used during the login event. If no platform name is available, “Unknown” is returned. Platform names are in English. For example, “Mac OSX”.
ReplayId
Type
string
Properties
Nillable
Description
Represents an ID value that is populated by the system and refers to the position of the event in the event stream. Replay ID values aren’t guaranteed to be contiguous for consecutive events. A subscriber can store a replay ID value and use it on resubscription to retrieve missed events that are within the retention window.
SessionKey
Type
string
Properties
Nillable
Description
The user’s unique session ID. Use this value to identify all user events within a session. When a user logs out and logs in again, a new session is started. For LoginAsEvent, this field is usually null because the event is captured before a session is created.
SessionLevel
Type
picklist
Properties
Nillable, Restricted picklist
Description
Session-level security controls user access to features that support it, such as connected apps and reporting. Possible values are:
  • HIGH_ASSURANCE - A high assurance session was used for resource access. For example, when the user tries to access a resource such as a connected app, report, or dashboard that requires a high-assurance session level.
  • LOW - The user’s security level for the current session meets the lowest requirements.

    This low level is not available, nor used, in the Salesforce UI. User sessions through the UI are either standard or high assurance. You can set this level using the API, but users assigned this level will experience unpredictable and reduced functionality in their Salesforce org.

    Note

  • STANDARD - The user’s security level for the current session meets the Standard requirements set in the current organization Session Security Levels.
SourceIp
Type
string
Properties
Nillable
Description
The source IP address of the client logging in. For example, 126.7.4.2.
TargetUrl
Type
string
Properties
Nillable
Description
The URL redirected to after logging in as another user succeeds.
UserId
Type
reference
Properties
Nillable
Description
Unique ID that identifies the user who is being logged in as by the admin. For example, 005000000000123.
Username
Type
string
Properties
Nillable
Description
Username of the user who is being logged in as by the admin, in the format of admin@company.com.
UserType
Type
picklist
Properties
Nillable, Restricted picklist
Description
The category of user license of the user who is being logged in as by the admin. Each UserType is associated with one or more UserLicense records. Each UserLicense is associated with one or more profiles. Valid values are:
  • CsnOnly—Users whose access to the application is limited to Chatter. This user type includes Chatter Free and Chatter moderator users.
  • CspLitePortal—CSP Lite Portal license. Users whose access is limited because they are organization customers and access the application through a customer portal or community.
  • CustomerSuccess—Customer Success license. Users whose access is limited because they are organization customers and access the application through a customer portal.
  • Guest
  • PowerCustomerSuccess—Power Customer Success license. Users whose access is limited because they are organization customers and access the application through a customer portal. Users with this license type can view and edit data they directly own or data owned by or shared with users below them in the customer portal role hierarchy.
  • PowerPartner—Power Partner license. Users whose access is limited because they are partners and typically access the application through a partner portal or community.
  • SelfService
  • Standard—Standard user license. This user type also includes Salesforce Platform and Salesforce Platform One user licenses, as well as admins for this org.