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)

How to customize the Sign-out Page in AD FS 3.0

(0) ShareShare
ReportReport
Posted on by 160

I am developing the dynamics crm 2013 On-premise in Windows Server 2012 R2. (AD FS 3.0)

I want to redirect from sign-out page to the sign-in page when I click the sign-out button in daynmiscs crm 2013.

How can I customize the sign-out page?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mahadeo Matre Profile Picture
    17,021 on at

    Hi..

    when you setup adfs &federation ..new website will be setup..and from there you can  customize sign  and sing out page

    Check

    blogs.technet.com/.../customizing-the-adfs-forms-based-login-page.aspx

    anexinetappdev.blogspot.com/.../adding-logout-to-mvc-applications-using.html

  • Verified answer
    Woo-Seok Profile Picture
    160 on at

    I solved the issue as I customized the onload.js. I added a redirect code into it.

  • Community Member Profile Picture
    on at

    Hi Woo-Seok,

    How were you able to get the org context? Let's say there are multiple orgs that you host on your server. Then when the user signout, you need to have the context of the client's enterpriseid - myenterpriseid1.crm.domain.com to be able to redirect the user to the log-in page. How did you accomplish this? We could redirect if I hard code the URL.

    I would like to be able to redirect user to the Login page when the user signs out as well. I would love you feedback/suggestion on this.

  • Community Member Profile Picture
    on at

    How did you do the URL redirect? Could you please give an example?

  • Community Member Profile Picture
    on at

    Hello,

    Could you share with us the way you do it ? 

    Thank you by avance.

    Regi4life

  • Suggested answer
    Community Member Profile Picture
    on at

    We were running into a similar issue on our Adxstudio portal integration.  I modified the onload.js file to include a version of the code:

    RedirectToThePortal();
    
    // Redirect back to the Portal
    function RedirectToThePortal() {
        // Get URL address
        var portalUrl = window.location.href;
    
        var IsOkay = false;
        var urlParams = '';
        var param = [];
        var adfsSignOut = {
            wa: '',
            wreply: 'my.portal.com/.../LogOff'    // default URL
        };
    
        if (portalUrl.length > 0) {
            // Parse URL Parmeters in an array
            urlParams = portalUrl.substring(portalUrl.indexOf("?") + 1, portalUrl.length).split("&");
    
            if (urlParams.length >= 2) {
                // Convert array into object for organization purposes only
                for (i = 0; i < urlParams.length; i++) {
                    param = urlParams[i].split("=");
                    // Make sure the required parameters contain a value
                    if (param.length == 2) {
                        // Fill object with parameter values
                        adfsSignOut[param[0].toLowerCase()] = param[1];
                    }
                }
                // If the objects are valid, redirect the user
                if (adfsSignOut.wa !== undefined && adfsSignOut.wreply !== undefined) {
                    if (adfsSignOut.wa.toLowerCase() == 'wsignout1.0' && adfsSignOut.wreply.length > 0) {
                        IsOkay = true;
                    }
                }
            }
        }
    
        if (IsOkay) {
            // Redirect to the Portal
            window.top.location.href = adfsSignOut.wreply;
        }
    }


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