---
schema_version: "1"
id: 0285e19f973181e68408a7887b0927e16809017a362d805622698b0ac0a4094b
title: AuthSession
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_authsession.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_authsession.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: d66c72c89db461e0c0ca84f428f93acd556608b457bb1ad696a83ba187ef5960
description: The AuthSession object represents an individual user session in your organization. This object is available in versions 29.0 and later.
---
# AuthSession

The AuthSession object represents an individual user session in your organization. This object is available in versions 29.0 and later.

## Supported Calls

delete(), describeSObjects(), query(), retrieve()

## Special Access Rules

To access the AuthSession object, users must have the Manage Users permission.

## Fields

| Field Name | Details |
| --- | --- |
| CreatedDate | 
Type

dateTime

Properties

Defaulted on create, Filter, Sort

Description

The date and time this session was created. This field is a standard system field.



 |
| Id | 

Type

id

Properties

Defaulted on create, Filter, Group, ID Lookup, Sort

Description

The current session’s ID.



 |
| IsAssociatedWithJwtAccessToken | 

Type

boolean

Properties

Defaulted on create, Filter, Group, Sort

Description

If true, the session is associated with a JSON Web Token (JWT)-based access token. This field is available in API version 64.0 and later.



 |
| IsCurrent | 

Type

boolean

Properties

Defaulted on create, Filter, Group, Sort

Description

If true, the session is a member of the user’s current session family. This field is available in API version 37.0 and later.



 |
| LastModifiedDate | 

Type

dateTime

Properties

Defaulted on create, Filter, Sort

Description

The date and time this session was last updated. A session expires when the current date and time equals LastModifiedDate + NumSecondsValid. This field is a standard system field.



 |
| LoginGeoId | 

Type

reference

Properties

Filter, Group, Nillable, Sort

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 field is available in API version 34.0 and later.

This is a relationship field.

Relationship Name

LoginGeo

Relationship Type

Lookup

Refers To

LoginGeo



 |
| LoginHistoryId | 

Type

reference

Properties

Filter, Group, Nillable, Sort

Description

The 18-character ID for a successful login event. When a session is reused, Salesforce updates the LoginHistoryId with the value from the most recent login. This field is available in API version 33.0 and later.

This is a relationship field.

Relationship Name

LoginHistory

Relationship Type

Lookup

Refers To

LoginHistory



 |
| LoginSubType | 

Type

picklist

Properties

Filter, Group, Nillable, Restricted picklist, Sort

Description

The type of login flow used. For a list of values, see the LoginSubType field on the [LoginHistory](https://developer.salesforce.com/docs/atlas.en-us.264.0.object_reference.meta/object_reference/sforce_api_objects_loginhistory.htm) object. This field is available in API version 67.0 and later.



 |
| LoginType | 

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 LoginType field on the [LoginHistory](https://developer.salesforce.com/docs/atlas.en-us.264.0.object_reference.meta/object_reference/sforce_api_objects_loginhistory.htm) object.



 |
| LogoutUrl | 

Type

string

Properties

Filter, Nillable, Sort

Description

The page or view to display after users log out of an Experience Cloud site, or an org if they authenticated using SAML. This field is available in API version 32.0 and later.



 |
| NumSecondsValid | 

Type

int

Properties

Filter, Group, Sort

Description

The number of seconds before the session expires, starting from the last update time.



 |
| ParentId | 

Type

reference

Properties

Filter, Group, Nillable, Sort

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.



 |
| SessionSecurityLevel | 

Type

picklist

Properties

Filter, Group, Nillable, Restricted picklist, Sort

Description

Standard or High, depending upon the authentication method used.



 |
| SessionType | 

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](https://help.salesforce.com/s/articleView?id=xcloud.security_session_types.htm&type=5&language=en_US "HTML (New Window)") in the Object Reference Guide.



 |
| SourceIp | 

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 SourceIp field doesn't support the LIKE [comparison operator](https://developer.salesforce.com/docs/atlas.en-us.264.0.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_comparisonoperators.htm).



 |
| UserType | 

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.



 |
| UsersId | 

Type

reference

Properties

Filter, Group, Nillable, Sort

Description

The user’s Salesforce user ID.

This is a relationship field.

Relationship Name

Users

Relationship Type

Lookup

Refers To

User



 |

## Usage

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.