Tips & Tricks | IFD Session

Dynamics Online or On-premises Dynamics CRM with IFD Deployment the IFD session is expired and this annoying users and you want to increase session timeout or inactivity timeout.


In order to edit session timeout or inactivity timeout.

You need to navigate to:

  • Setting -> Administration -> System Setting
  • On General Tab scroll down
  • Select Set custom for session timeout and enter your values within the range
  • Select Set custom for inactivity timeout and enter your values within the range


For On-premises Deployment you may not found those section as below.



In order to view those section you need to do the below steps:

To view session timeout section need to run the below in Power-Shell command:

Add-PSSnapin "Microsoft.Crm.PowerShell"

$itemSetting = new-object 'System.Collections.Generic.KeyValuePair[String,Object]' ("AllowCustomSessionDuration",1)

$configEntity= new-object "Microsoft.Xrm.Sdk.Deployment.ConfigurationEntity"

$configEntity.LogicalName = "ServerSettings"

$configEntity.Attributes=new-object "Microsoft.Xrm.Sdk.Deployment.AttributeCollection"

$configEntity.Attributes.Add($itemSetting)

set-CrmAdvancedSetting -Entity $configEntity

Below a query to view Server Settings Properties related to IFD Session:

SELECT TOP (1000) [Id]
      ,[ColumnName]
      ,[BigIntColumn]
      ,[IntColumn]
      ,[SmallIntColumn]
      ,[TinyIntColumn]
      ,[BitColumn]
      ,[FloatColumn]
      ,[DateTimeColumn]
      ,[SmallDateTimeColumn]
      ,[NVarCharColumn]
      ,[UniqueIdentifierColumn]
      ,[VarBinaryColumn]
      ,[Encrypted]
FROM [MSCRM_CONFIG].[dbo].[ServerSettingsProperties]
Where [ColumnName] like '%Session%'

Default Values: 

AllowCustomSessionDuration                           Default:0
DefaultIFDSessionTimeoutInMinutes                    Default:60
MinimumSessionTimeoutInMinutes                       Default:60
MinimumSessionTimeoutWarningInMinutes                Default:20

To view inactivity timeout section need to run the below in Power-Shell command:Add-PSSnapin "Microsoft.Crm.PowerShell"

$itemSetting = new-object 'System.Collections.Generic.KeyValuePair[String,Object]' ("AllowCustomInactivityDuration",1)

$configEntity= new-object "Microsoft.Xrm.Sdk.Deployment.ConfigurationEntity"

$configEntity.LogicalName = "ServerSettings"

$configEntity.Attributes=new-object "Microsoft.Xrm.Sdk.Deployment.AttributeCollection"

$configEntity.Attributes.Add($itemSetting)

set-CrmAdvancedSetting -Entity $configEntity

Below a query to view Server Settings Properties related to IFD Inactivity timeout:

SELECT TOP (1000) [Id]
      ,[ColumnName]
      ,[BigIntColumn]
      ,[IntColumn]
      ,[SmallIntColumn]
      ,[TinyIntColumn]
      ,[BitColumn]
      ,[FloatColumn]
      ,[DateTimeColumn]
      ,[SmallDateTimeColumn]
      ,[NVarCharColumn]
      ,[UniqueIdentifierColumn]
      ,[VarBinaryColumn]
      ,[Encrypted]
  FROM [MSCRM_CONFIG].[dbo].[ServerSettingsProperties]

  where [ColumnName] like '%Inactivity%'

Default Values:

AllowCustomInactivityDuration                  Default:0
MinimumInactivityTimeoutInMinutes              Default:5
MinimumInactivityTimeoutWarningInMinutes       Default:1

After running Power-Shell commands you need to restart IIS.

Popular posts from this blog

Tips & Tricks | Solution Layers [Remove Active Customization]

Tips & Tricks | Power Automate [Cognitive Services]

Tips & Tricks | Power Apps Community Plan [Development Environment]