Introduction
You might have noticed that in SharePoint 2013 the Sign in as Different User menu option is missing. It is a very handy option for developers like us that allows us to login with another account to test the custom solution functionality with a different permission account.
Microsoft has removed this option from SharePoint 2013. I am not sure why they removed it. It was never a perfect option to work on, however. I have many issues when using this option, some of them are listed below:
- Caching Problem.
- Unknowingly some documents might be opened in an external application and are saved with an unexpected account.
- Cookies are not properly cleared.
However, still there are some ways by which we can enable this option in our SharePoint Site.
Temporary Workaround
- Login to Internet Explorer with a different user account. Use the (Shift + Right Click) option to “Log in as different User”.
- Access the Close Connection.aspx page URL; http://{YourSharePointSiteURL}/_layouts/CloseConnection.aspx?Loginasdifferentuser=true
Permanent Fix
However we have a permanent fix for this; that is to enable the “Sign in as different user” option which is not recommended.
- Go to \15\TEMPLATE\CONTROLTEMPLATES. Here we have a file named welcome.ascx.
- Add the following element before the existing element with the id “ID_RequestAccess”:
- <SharePoint:MenuItemTemplate runat="server" ID="ID_LoginAsDifferentUser"
- Text="<%$Resources:wss,personalactions_loginasdifferentuser%>"
- Description="<%$Resources:wss,personalactions_loginasdifferentuserdescription%>"
- MenuGroupId="100"
- Sequence="100"
- UseShortId="true"
- />
- Refresh the SharePoint Site page and you will see the option is enabled now.
Note: I would suggest that if you want to do it, do it in your Test or Dev SharePoint environment.
Happy SharePointing!