“Sign in as another user” in Microsoft SharePoint Server 2013

As you know, in SharePoint 2013, Microsoft has removed “Sign in as another user” from SharePoint UI

According to this article, Microsoft explains why this feature is removed from SharePoint: http://support.microsoft.com/kb/2752600
There is a work around to this issue in SharePoint 2013,  but before explaining these solutions, please notice to problems and disadvantages of using “Sign in as another user” in SharePoint 2013.
SharePoint-2010-2013-Sign-in-as-Different-User

We sometimes see customers running into problems when using the “Sign in as Different User” feature in SharePoint.
Common problems are

  • Documents opened in external applications are saved with an unexpected user account because the external application runs under the windows account logged in to the machine and not the account you have chosen in SharePoint
  • Page content shows information from the previous user due to cached information
  • Session variables contain information from previous user as the cookies are not cleared

The Sign in as Different User functionality is not meant to be used as a security feature!
This feature allows users which have more than one AD account to quickly login with a different account to SharePoint but it does not guarantee that no artifacts from the previous user remain!

If you have to guarantee that one user cannot see data from a different user you have to logoff/logon in Windows. Don’t use the Sign in as a different user.

Solution 1: Internet Explorer’s Different User Option
Start Internet Explorer by using the Run as different user option, and then go to the SharePoint site.
Note: The Run as different user option is visible if you hold the Shift key when you right-click a program icon.

Solution 2: Navigate to the Close Connection Page
A slightly faster way to accomplish this is to navigate to the Close Connection page. Just visit the following URL in your browser:
http://<site URL>/_layouts/closeConnection.aspx?loginasanotheruser=true

As soon as you hit this page, the familiar pop-up will prompt you for the username to log in with. Once you log in, you will be redirected to the home page.

Solution 3: Customize Welcome.ascx
Customize Welcome.ascx which is located at: \Program Files\Common Files\microsoft shared\Web ServerExtensions\15\TEMPLATE\CONTROLTEMPLATES.

Add this to the welcome.ascx file. But a note to consider, please take the backup of the welcome.ascx file before you attempt this step.

<SharePoint:MenuItemTemplate runat=”server” ID=”ID_LoginAsDifferentUser” Text=”<%$Resources:wss,personalactions_loginasdifferentuser%>” Description=”<%$Resources:wss,personalactions_loginasdifferentuserdescription%>” MenuGroupId=”100″ Sequence=”100″ UseShortId=”true” />
and then you should have the sign in as different user option available.

Solution 4: Create Internet Explorer Shortcut

  1. Create a shortcut to your favorite browser. In Windows I did this by navigating to C:\Program Files (x86)\Internet Explorer and dragging iexplore.exe to the desktop (by default this creates a shortcut).
  2. Right click your new shortcut and select “Properties”
  3. Modify the shortcut target by adding runas and the desired user account to the beginning of the path. Change the target to (replace user@domain with your test acct):
    %systemroot%\System32\runas.exe /user:user@domain “%ProgramFiles(x86)%\Internet Explorer\iexplore.exe”
  4. Click OK to save changes.

Solution 5: Using Visual Studio 2012

  1. Create a new SharePoint 2013 solution in Visual Studio 2012
  2. Add new Module to the project
  3. Remove the Sample.txt file from added module
  4. Copy and paste the following XML in the element file

About

MCSE, PMP, With more than 12 years experience in Microsoft technologies.

View all posts by

Leave a Reply