Wednesday, March 13, 2013

Your session in Microsoft Dynamics CRM is about to expire. CRM 2011 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.
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

1. Start Windows PowerShell
2. Copy and Paste the following command into PowerShell and hit enter (you can right click to paste):
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.

No comments:

Post a Comment