web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Dynamics CRM Session Timeout

(0) ShareShare
ReportReport
Posted on by 765

Hey Everyone,

I have an on-premise version of Dynamics CRM 2015 with the IFD configured. The problem is that when users use the internal URL after some time their session times out. I've been looking around trying to find a solution to this and I did try the whole:

1. Add-PSSnapin Microsoft.Adfs.PowerShell
2. Get-ADFSRelyingPartyTrust -Name "relying_party"

but I do the first step I get 'The windows PowerShell snap-in 'Microsoft.Adfs.PowerShell' is not installed on this computer. And if I skip that step and do step 2 and it says TokenLifetime is 0, which can't be right either.


I'm on Windows Server 2012 R2 running ADFS 3.0.

Thanks

*This post is locked for comments

I have the same question (0)
  • Royal King Profile Picture
    27,686 on at

    You have to login to the ADFS server to execute this power shell command. Once you login on windows start button type power shell that will search power shell console.

    Also make sure run the power shell module as Administrator.

  • AEdwards Profile Picture
    765 on at

    Yes, I know, I had already done those steps too. I was on the ADFS server, ran PowerShell as Admin, then when I ran those commands I got the above issues.

  • Royal King Profile Picture
    27,686 on at

    If ADFS installed correctly that automatically installs ADFS Power Shell module as well.

    Can you run below command in power shell

    Get-PSSnapin –Registered

    If  ADFS power shell exists in your server it will dispaly follwoing infoamtion

    Name        : Microsoft.Adfs.PowerShell

    PSVersion   : 1.0

    Description : This PowerShell snap-in contains cmdlets used to manage Microsoft Identity Server resources.

    If you dont see see this information that means something did not install properly on the server. You may try to Repairing the ADFS installtion that may fix this issue

  • AEdwards Profile Picture
    765 on at

    It says I have:

    Name: Microsoft.Crm.Powershell

    PSVersion: 4.0

    but no Adfs.Powerhsell

  • AEdwards Profile Picture
    765 on at

    Is there a way to 'repair' AD FS without uninstalling & reinstalling? This a production environment that can't really afford to go down.

  • Royal King Profile Picture
    27,686 on at

    Execute the belwo cmd that will list all the power shell modules installed on the server

    get-module -listavaiable

    If it lists ADFS then execute get-command -noun "ADFS"

    then try with Set-ADFSRelyingPartTrust

  • Verified answer
    Royal King Profile Picture
    27,686 on at

    It seems there is no need to execute Add-PSSnapin Microsoft.Adfs.PowerShell in ADFS version 2.1 and above. You can directly issue cmd's like

    Get-ADFSRelyingPartyTrust -Name "relying_party"

    set-ADFSRelyingPartyTrust

  • AEdwards Profile Picture
    765 on at

    I've tried running:

    Get-ADFSRelyingPartyTrust -Name "relying_party"

    but the TokenLifetime setting is currently 0. Which can't be correct, can it?

    *EDIT* TokenLifetime, not tokentimeout

  • Verified answer
    AEdwards Profile Picture
    765 on at

    Apparently, 0 is actually default for 60min. I've gone ahead and run:

    Set-ADFSRelyingPartyTrust -Targetname "relying_party" -TokenLifetime 480

    which set it to 480 minutes, or 8 hours. We'll see if that fixes the issue, Thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans