ProfileSessionSetting defines a profile's session policy, including the required authentication security level and the inactivity timeout. It is a separate metadata component from Profile. The required profile element names the profile whose users receive the policy; the inherited fullName identifies the settings component for deployment and retrieval. These names are not interchangeable.
Key Elements
| Element | What the Element Controls |
|---|---|
fullName |
The component's metadata identity, inherited from Metadata. Resolve its actual value rather than using the profile name as the manifest member. |
profile |
Required. References a Profile by name and determines which users receive these settings. |
requiredSessionLevel |
The required session security level: STANDARD, HIGH_ASSURANCE, or LOW. Interpret the requirement against the org's Session Security Levels configuration. LOW is API-only and has documented functionality risks. |
sessionTimeout |
Required. The inactivity interval before the authenticated session expires. Allowed values are 0, 15, 30, 60, 90, 120, 240, 480, 720, and 1440. Nonzero values express minutes directly. Both 0 and 120 mean two hours. This value overrides the org-wide timeout. |
sessionPersistence |
Beta. Applies only to the External Identity profile. When true, users remain logged in to their Experience Cloud site after closing the browser, until the session times out. |
Behavior and Constraints
Authentication requirements are not session authentication records
A session security level classifies a session according to the authentication used to log in and controls access to certain resources. The requiredSessionLevel element records the profile's requirement, not proof of how a particular user's current session was authenticated.
-
STANDARDmeets the Standard requirements configured under Session Security Levels in the org's session settings. Username and password authentication is the documented standard-level example. -
HIGH_ASSURANCEmeets the configured High Assurance requirements. Multi-factor authentication is the documented high-assurance example. -
LOWis available at the API level but is not available or used in the Salesforce UI. Users assigned this level experience unpredictable and reduced functionality.
A profile timeout remains an override
sessionTimeout measures inactivity. When that interval expires, the authenticated session ends and the user must log in again. The profile-specific value overrides the org-wide timeout, so subsequent changes to the org-wide timeout do not affect users of that profile.
0 means two hours. It does not mean unlimited duration, no timeout, or inheritance from the org. Setting the profile timeout equal to the current org-wide timeout also leaves an explicit override in place.
Browser persistence does not remove the timeout
For the External Identity profile, sessionPersistence=true allows an Experience Cloud site login to survive browser closure. The session still expires when its timeout is reached. Browser closure and inactivity timeout are separate boundaries, and this Beta setting is not a general persistence control for other profiles.
Deployment and Retrieval
Components use the .profileSessionSetting file suffix and reside in the profileSessionSettings directory. In package.xml, use the type name ProfileSessionSetting. Wildcard retrieval with * is supported and can discover the component names without predicting their generated suffixes.
Resolve the destination component identity
Use the actual component fullName for deployment identity, and use profile to identify the policy's target profile. A reported generated-name pattern is <ProfileName>_profileSessionSetting<digits>, but this is not a documented naming guarantee.
Cross-org deployment can encounter identity collisions. A 2018 report described different generated component names across orgs and deployment errors when a second component targeted a profile that already had settings. A July 2026 report instead found identical numeric suffixes across development, QA, UAT, and production. Neither suffix stability nor suffix differences should be assumed; retrieve the destination's actual component identity.
Restoring org-wide timeout inheritance
Restoring inheritance may require deleting the override component rather than assigning another timeout value. A July 2026 community report described using a destructive metadata deployment, which explicitly deletes components, and finding no UI reset option.
For the reported single-profile procedure:
- Retrieve
ProfileSessionSettingcomponents and locate the component whoseprofilematches the intended profile. - Use that component's actual generated name as the member under
ProfileSessionSettingindestructiveChanges.xml, rather than using only the profile name. - Deploy the destructive manifest with a
package.xmlmanifest.
This deletes the settings component, not merely its sessionTimeout element. Treat it as removal of the component's policy, not as a timeout-only edit.
Relationships
The profile reference determines whose sessions the policy governs. It does not determine the settings component's deployment identity. The org's Session Security Levels configuration supplies the meaning of the authentication requirement, while the profile timeout overrides the org-wide timeout.
References
-
Profile:profile.
Reported Issues
-
Cross-org deployment can collide with an existing policy for the same profile. A 2018 report described automatically generated names following
<ProfileName>_profileSessionSetting<digits>, different names across orgs, and deployment errors when another settings component already targeted the profile. This is reported behavior, not a documented naming or uniqueness guarantee. Cross-org identity and override discussion. - A generated member name may not be predictable before retrieval. In a 2019 discussion, the questioner reported that a Salesforce support case led to guidance that the numeric portion would differ. The discussion does not establish a reliable way to derive the name from a profile or timestamp. Generated member-name discussion.
-
A source pull can fail because local tracking refers to a missing settings component. In 2021, a user reported an "Entity of type 'ProfileSessionSetting' ... cannot be found" error. Removing a
SourceMemberdid not resolve that case; removing references to the entity from the localmaxRevision.jsontracking file reportedly did. This was a local source-tracking workaround, not a change to the session policy. Missing component during source pull. - Resetting inheritance may require destructive deletion rather than a UI change. A July 2026 report found no UI reset option and described restoring org-wide timeout inheritance by deleting the settings component. A single-profile deletion required its generated component name, not just the profile name. The reporter found matching numeric suffixes across development, QA, UAT, and production, unlike the earlier cross-org report. Reported destructive-deployment reset.
Common Questions
Does sessionTimeout 0 disable the session timeout?
No. 0 means two hours, just like 120. It does not disable expiration or restore inheritance from the org-wide setting.
How do I reset a profile's session timeout to the org default?
Assigning the same timeout as the org does not restore inheritance. A July 2026 report described deleting the ProfileSessionSetting component through a destructive metadata deployment. That removes the entire component, and the reported single-profile deletion required its generated component name.
How do I find the ProfileSessionSetting name for package.xml?
Retrieve ProfileSessionSetting with a wildcard member, *, then match the returned component's profile value to the intended profile. Use the actual component identity rather than constructing a name from the profile name or numeric suffix.
Why does deploying ProfileSessionSetting to another org fail?
One reported cause is an identity collision: the destination already has a settings component for the profile, but the incoming component has a different generated name. Resolve the destination's actual component identity; generated suffixes have been reported as both different and identical across environments.
Does sessionPersistence keep all Salesforce users logged in after closing the browser?
No. This Beta setting applies only to the External Identity profile and its Experience Cloud site sessions. Even when enabled, the session still expires when its timeout is reached.