Solved

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

Posted on 2014-07-30
3
982 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
3 Comments
 
LVL 8

Accepted Solution

by:
Jayaraja Jayaraman earned 500 total points
Comment Utility
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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now