Newer Version Available
ProfileSessionSetting
Represents a profile’s session settings. Use
ProfileSessionSetting to retrieve the session settings for a given profile.
This type extends the Metadata
metadata type and inherits its fullName field.
File Suffix and Directory Location
ProfileSessionSetting components have the suffix .profileSessionSetting and are stored in the profileSessionSettings folder.
Version
ProfileSessionSetting components are available in API version 40.0 and later.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| forceLogout | boolean | Required. If true, when the session times out, users are logged out immediately and redirected to a default or custom logout URL. |
| profile | string | Required. Name of the user profile. |
| requiredSessionLevel | SessionSecurityLevel | Session security level. |
| sessionTimeout | int | Required. Specifies how many minutes of inactivity elapse before a user’s authenticated session times out. At the end of the session, the user must log in again. This session timeout value applies to users of the profile and overrides the org-wide timeout value. Changes to the org-wide timeout value don’t apply to users of this profile. Valid values: 15, 30, 60, 120, 240, 480, 720, 1440. |
| sessionTimeoutWarning | boolean | Required. If true, the user receives a warning when the session is about to expire. |
SessionSecurityLevel
Session security levels control access to certain types of resources based on the type of authentication used for logging in to the current session. For example, username and password authentication requires the standard session security level. Two-factor authentication requires HIGH_ASSURANCE.
| Field Name | Field Type | Description |
|---|---|---|
| SessionSecurityLevel | (enumeration of type string) | User’s security level for the current session.
|
Declarative Metadata Sample Definition
The following is an example of a ProfileSessionSetting component.
1<?xml version="1.0" encoding="UTF-8"?>
2<ProfileSessionSetting xmlns="http://soap.sforce.com/2006/04/metadata">
3 <forceLogout>false</forceLogout>
4 <profile>platformportal</profile>
5 <requiredSessionLevel>HIGH_ASSURANCE</requiredSessionLevel>
6 <sessionTimeout>1440</sessionTimeout>
7 <sessionTimeoutWarning>false</sessionTimeoutWarning>
8</ProfileSessionSetting>