AuthSession
The AuthSession object represents an individual user session in your organization.
Introduced in API version 29.0.
delete(), describeSObjects(), query(), retrieve()
- To access the AuthSession object, users must have the Manage Users permission.
- Type: boolean
- Properties: Defaulted on create, Filter, Group, Sort
- Introduced: API version 64.0
- Description: If
true, the session is associated with a JSON Web Token (JWT)-based access token. - Default value: false
- Type: boolean
- Properties: Defaulted on create, Filter, Group, Sort
- Introduced: API version 37.0
- Description: If
true, the session is a member of the user’s current session family. - Default value: false
-
Type: reference
-
Properties: Filter, Group, Nillable, Sort
-
Introduced: API version 34.0
-
Description:
The 18-character ID for the record of the geographic location of the user for a login event. Due to the nature of geolocation technology, the accuracy of geolocation fields (for example, country, city, postal code) can vary.
This is a relationship field.
-
Relationship name: LoginGeo
-
Relationship type: relationship
-
Refers to: LoginGeo
-
Type: reference
-
Properties: Filter, Group, Nillable, Sort
-
Introduced: API version 33.0
-
Description:
The 18-character ID for a successful login event. When a session is reused, Salesforce updates the
LoginHistoryIdwith the value from the most recent login.This is a relationship field.
-
Relationship name: LoginHistory
-
Relationship type: relationship
-
Refers to: LoginHistory
- Type: picklist
- Properties: Filter, Group, Nillable, Restricted picklist, Sort
- Introduced: API version 67.0
- Description: The type of login flow used. For a list of values, see the
LoginSubTypefield on the LoginHistory object.
- Type: picklist
- Properties: Filter, Group, Nillable, Restricted picklist, Sort
- Description: The type of login used to access the session. For a list of values, see the
LoginTypefield on the LoginHistory object.
- Type: string
- Properties: Filter, Nillable, Sort
- Introduced: API version 32.0
- Description: The page or view to display after users log out of an Experience Cloud site, or an org if they authenticated using SAML.
- Type: int
- Properties: Filter, Group, Sort
- Description: The number of seconds before the session expires, starting from the last update time.
- Type: reference
- Properties: Filter, Group, Nillable, Sort
- Introduced: API version 31.0
- Description: The 18-character ID for the parent session, if one exists (for example, if the current session is for a canvas app). If the current session doesn’t have a parent, this value is the current session’s own ID.
- Relationship name: Parent
- Relationship type: relationship
- Refers to: AuthSession
- Type: picklist
- Properties: Filter, Group, Nillable, Restricted picklist, Sort
- Description: Standard or High, depending upon the authentication method used.
-
Type: picklist
-
Properties: Filter, Group, Nillable, Restricted picklist, Sort
-
Description:
The type of session. Common ones are UI, Content, API, and Visualforce.
For more information, see User Session Types in the Object Reference Guide.
-
Type: string
-
Properties: Filter, Group, Sort
-
Description:
IP address of the end user’s device from which the session started. This address can be an IPv4 or IPv6 address.
The
SourceIpfield doesn’t support theLIKEcomparison operator.
- Type: picklist
- Properties: Filter, Group, Restricted picklist, Sort
- Description: The kind of user for this session. Types include Standard, Partner, Customer Portal Manager, High Volume Portal, and CSN Only.
-
Type: reference
-
Properties: Filter, Group, Nillable, Sort
-
Description:
The user’s Salesforce user ID.
This is a relationship field.
-
Relationship name: Users
-
Relationship type: relationship
-
Refers to: User
The AuthSession object exposes session data and enables read and delete operations on that data. For example, use this object to see who is signed in to your org. Or you can use this object to create a tool to delete a session, ending that user’s session. For a user, only their own sessions are available, while administrators can see all sessions.
You can’t change user sessions with this object. You can only read and delete them.