SharePoint 2013 Sign in as Different User Missing – Feature Based Solution

Sign in as different user menu option is missing in SharePoint server 2013, it has many possible workarounds which are explained in my earlier post: Sign in as Different User in SharePoint 2013 – Workarounds

How to add sign in as a different user in SharePoint 2013?

To enable sign in as a different user in SharePoint 2013, let’s build a feature-based solution using Visual Studio:

  • Open Visual Studio 2013 (or 2012) >> Click on File >> New >> Project
  • Choose: Office/SharePoint >> SharePoint 2013 – Empty Project. Name your solution and click on “OK” sharepoint foundation 2013 sign in as different user
  • Enter the site for debugging and choose “Farm Solution” (Doesn’t matter even it’s a sandboxed solution too!) and click on the “Finish” button. Wait for Visual Studio to create the project structure.
    how to add sign in as different user in sharepoint 2013
  • Now, in Visual Studio, Right-click the “Project” node from the solution explorer window, choose: Add >> New Item menu.
  • Choose “Module” and give it a name. Click on Add.
    sign in as different user menu option is missing in sharepoint server 2013
  • This module brings a feature “feature1” and “Sample.txt” File by default. Remove the sample.txt from the solution and rename Feature1 to something meaningful, I’ve made it the same as my project name – SignInAsDiffUser
    sign in with different user sharepoint 2013
  • Update the elements.xml file with the below code
<?xml version="1.0" encoding="utf-8"?>
  <Elements xmlns="https://schemas.microsoft.com/sharepoint/">
      <CustomAction
        Id="LoginAsDifferentUser"
        GroupId="PersonalActions"
        Location="Microsoft.SharePoint.StandardMenu"
        Sequence="1000"
        Title="Sign in as Different User">
        <UrlAction Url="/_layouts/closeConnection.aspx?loginasanotheruser=true"/>
  </CustomAction>
</Elements>
  • Now, Right-click the Feature, “SignInAsDiffUser” from solution explorer and choose the “View Designer”menu item. On the feature designer page, give a name and description of your feature. Set the scope for the feature, I’ve made it: Site, So that it will be applicable for the entire site collection. Make sure the module we’ve created is included in the feature.
    add sign in as different user in sharepoint 2013
  • Right-click the solution in Visual Studio, choose To deploy. This will automatically build, deploy, and activate your feature. Go to site collection features and make sure the “Sign in As different User” feature is activated.
    how to enable sign in as different user in sharepoint 2013

Now, You’ll be getting a “Sign in As Different” user menu item under your personal settings menu in SharePoint foundation /Server.

enable sign in as different user sharepoint 2013

Salaudeen Rajack

Salaudeen Rajack - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

Leave a Reply

Your email address will not be published. Required fields are marked *