Your session in Microsoft Dynamics CRM is about to expire. CRM 2011 2013 Extend Session Time

Sick of seeing the message “Your session in Microsoft Dynamics CRM is about to expire. To continue working, you must sin in again.” and would like to extend the session time so as not to bother you as often?
This is quite easy with an IFD setup of CRM 2011. We have an IFD configuration and setup that we use to test settings and some of our CRM Portal – Linking to DotNetNuke on.
Taking the server as configured as described here:
We ended up with an ADFS Relying Party Trust that is named “CRM IFD Relaying Party”
This is the name we must use in the Windows PowerShell program to make the necessary changes.

To Extend the Auto Logout of IFD CRM 2011 or 2013

1. Start Windows PowerShell
2. Copy and Paste the following command into PowerShell and hit enter (you can right click to paste): (Not Required on Windows 2012, skip this).

Add-PSSnapin Microsoft.Adfs.PowerShell

3. Check you have the correct name of the Relying party trust by typing the following:

Get-ADFSRelyingPartyTrust -Name "relying_party"

Where you replace “replying_party” with the name of your relying party trust. In our case we would use:

Get-ADFSRelyingPartyTrust -Name “CRM IFD Relaying Party”

You should see a bunch of junk, indicating that you have the correct name:
4. Now type the following command:

Set-ADFSRelyingPartyTrust -Targetname "relying_party" -TokenLifetime 480

Where you replace the “relying_party” with the name of your relying party. Again in our case we would use:

Set-ADFSRelyingPartyTrust -Targetname "CRM IFD Relaying Party" -TokenLifetime 480

Note that the 480 is in minutes. You can change that value up or down as required.
We chose to use 24 hours for example.
That’s all there is to it. Close the PowerShell and you are done.


14 thoughts on “Your session in Microsoft Dynamics CRM is about to expire. CRM 2011 2013 Extend Session Time”

  1. Thanks for posting this. If we had someone complete our CRM installation (we’re using ADFS) and I don’t know the relaying party, how can I complete this step?
    Get-ADFSRelyingPartyTrust -Name “CRM IFD Relaying Party”
    Is there a way to find the Relaying Party?

    1. If you launch AD FS 2.0, and go to the “Relying Party Trusts” on the left, the name you’re looking for is the display name of the internal one on this list. On my system I just have an Internal and an External one.

      1. Double check your configuration against our CRM 2011 and or 2013 configuration with IFD guide. I’m not certain why you would not have this, but seeing where you deviated from our guide may assist.

    2. thanks for the information but adding 1440 minutes to my Relyting Party Trust didnt help. I have to 2 relying party trusts for CRM. DO i have to run the command for both trusts?

    3. Hello, i had the same problem with the session but it expires before the 60 minutes and when i’m using the crm, so when there is activity.
      Can I solve it like you or this is another problem?
      Please help me.
      The error is the same that you posted

      1. I would accept that the cause of the problem, is the same. The logout issue is irrespective of whether you are using the connection or not. It is not an idle logout problem, it is a problem associated with the time since initial authentication of the ticket that is being used to access the server. For this reason I would suspect that your administrator has set the logout already to 60 minutes. As discussed in our article you can easily change this.

    4. I have updated our IFD and its RelyingParty (from the instructions) to 15 hours and yet it still timeout in an hour or so. Is there another source I need to update? Thanks.

    5. Pingback: Dotnetnuke Microsoft Dynamics Crm – Information

Leave a Reply

Your email address will not be published. Required fields are marked *