Configuring Logout

  1. Modify logoutSuccess.jsp to add the following lines in which are bold. This code clears the SharePoint service-specific cookie created by Access Gateway.

    NativeClientPersistentAuthenticationClass.clearCookie(request, response);
       {
               final Cookie newCookie = new Cookie("_PA_SDK_SSO_", "");
        newCookie.setMaxAge(0);
        newCookie.setPath("/nidp/");
        response.addCookie(newCookie);
       }
    //***Expire the MFNAMSP Cookie **
            Cookie mfcookie = new Cookie("MFNAMSP", null);
            mfcookie.setPath("/");
            mfcookie.setMaxAge(0);
            response.addCookie(mfcookie);
     NIDPSessionAssurance nidpSessAssurance = NIDPSessionAssurance.getInstance();
            nidpSessAssurance.clearIDCCookie(request,response);
            response.setHeader("Connection", "close");
            UIHandler uh = new UIHandler(request,response);

    For information about how to modify a configuration file, see Modifying Configurations.

  2. Change the logout URL to nidp/app/logout in the SharePoint identity provider by using the following command in PowerShell:

    $ip = get-sptrustedidentitytokenissuer
    $ip.ProviderSignOutUri = "https://<idp-domain.com>/nidp/app/logout"
    $ip.update()