Solved

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

Posted on 2014-07-30
3
1,016 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How do I set a formatting mask in an InfoPath 2010 control? 3 35
jQuery Syntax 2 47
sharepoint online 3 34
jquery to restrict certain words from input in form 11 12
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…
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
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…

912 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

19 Experts available now in Live!

Get 1:1 Help Now