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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Automatic redirect to login page after logout

(0) ShareShare
ReportReport
Posted on by

Hi,

I'm successfully configured dynamics crm IFD. But there's a problem, simple but really annoying for some user. By default after user click Sign Out then CRM will redirect to address like https://sts.domain.com/adfs/ls/?wa=wsignout1.0#123456789, and user need to type in the address bar to sign in again. My question, is there any way to automatically redirect to Sign In page after click Sign Out in Dynamics CRM?

Thanks,

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Karsten Wirl Profile Picture
    4,477 on at
    RE: Automatic redirect to login page after logout

    Hello.

    Have a look hier.

    community.dynamics.com/.../151740

    Kind regards,

    Karsten

  • Suggested answer
    Megan V. Walker Profile Picture
    1,810 Most Valuable Professional on at
    RE: Automatic redirect to login page after logout

    Hi wicaksonodiaz, I am guessing you probably figured out an approach, but I am posting the resolution I found just in case someone else comes across this issue also. I am using D365 and Microsoft Portals. To do what you are looking for, I did the following:

    Go to Web Templates, then look for the Header template. In the source, look for the following (it's near the bottom of the source code):

    <li>

                         <a href="{% if homeurl%}/{{ homeurl }}{% endif %}{{ website.sign_out_url_substitution }}" title="{{ snippets["links/logout"] | default:resx["Sign_Out"] | h }}">

                           {{ snippets["links/logout"] | default:resx["Sign_Out"] | h }}

                       </a>

                     </li>

    and change it to this:

    <li>

                         <a href="{% if homeurl%}/{{ homeurl }}{% endif %}Account/Login/LogOff?returnUrl={{ request.raw_url_encode | escape }}" title="{{ snippets["links/logout"] | default:resx["Sign_Out"] | h }}">

                           {{ snippets["links/logout"] | default:resx["Sign_Out"] | h }}

                       </a>

                     </li>

    It's really only this part that's being changed:

    {{ website.sign_out_url_substitution }}

    and changing it to:

    Account/Login/LogOff?returnUrl={{ request.raw_url_encode | escape }}

    Again, this is with D365 and MS Portals, not ADXStudio. Hopefully if someone stumbles across this post like I did, they might find this information useful.

  • Suggested answer
    Gopinath Gurusamy Profile Picture
    125 on at
    RE: Automatic redirect to login page after logout

    Thanks Megan, this works perfectly.

    Also  I changed the returnurl to my custom page

    From:

    Account/Login/LogOff?returnUrl={{ request.raw_url_encode | escape }}

    To:

    Account/Login/LogOff?returnUrl=My-Page

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

#3
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans