Solved

How do I script signout process for SharePoint 2013 in JavaScript?

Posted on 2014-07-30
3
1,108 Views
Last Modified: 2014-09-08
I am looking to set up a custom signout button within SharePoint 2013.  I would like to clear the fedauth cookie as a part of the process.  Has anyone written a javascript to accomplish this?
0
Comment
Question by:CKH00629
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 8

Accepted Solution

by:
Jayaraja Jayaraman earned 500 total points
ID: 40231882
This si for adding sign in as different user
javascript:void(window.location.href='/_layouts/closeConnection.aspx?loginasanotheruser=true&Source=' + encodeURIComponent(window.location.href));

OR

<script type="text/javascript">
    function Timeout(){
        var t = setTimeout("RedirectToLogout()", 20*60000);
    }
    function RedirectToLogout(){
       var path = SP.Utilities.Utility.getLayoutsPageUrl("SignOut.aspx");
       window.navigate(path);
    }
    </script>
i have added this script in body section

<script>
    window.onload=Timeout;
</script>

Or in more easy
<a href="_layouts/signout.aspx">log out</a>
0
 
LVL 58

Expert Comment

by:Gary
ID: 40309934
I've requested that this question be deleted for the following reason:

The question has either no comments or not enough useful information to be called an "answer".
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question