Add “sign in with another user” on SharePoint 2016

Andy 1,346 Reputation points
2023-02-28T08:28:02.4366667+00:00

If we want to sign out a user and sign in with another one, we need to clear the cookie of our browser or use a private mode, it is complex, can we add a button like in SharePoint 2010 to SharePoint 2016?

SharePoint 2010:

User's image

SharePoint 2016:

User's image

SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,597 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yanli Jiang - MSFT 24,356 Reputation points Microsoft Vendor
    2023-03-01T06:47:34.6266667+00:00

    Hi @Andy,

    SharePoint 2016 doesn’t offer the handy “Sign-in as Different User” feature under the welcome menu.

    Apart from the "clear the cookie of our browser or use a private mode" you said. Here are two more ways for your reference:

    1, Navigate to Close Connection Page

    Navigate to the URL: https://Your-Site/_layouts/closeConnection.aspx?loginasanotheruser=true

    In my environment, I use this url.

    http://sp16/sites/amy/_layouts/closeConnection.aspx?loginasanotheruser=true

    03011

    2, Edit “Welcome.ascx” file (modifying files in the SharePoint file system is not a good way)

    Log in to Windows with the account configured for SharePoint Server to edit “Welcome.ascx” file, which is at “C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\TEMPLATE\CONTROLTEMPLATES” folder.

    Open it in notepad, Add this new entry under the node: SharePoint:FeatureMenuTemplate

    <SharePoint:MenuItemTemplate runat="server" ID="ID_LoginAsDifferentUser"
                                  Text="<%$Resources:wss,personalactions_loginasdifferentuser%>"
                                  Description="<%$Resources:wss,personalactions_loginasdifferentuserdescription%>"
                                  MenuGroupId="100"
                                  Sequence="100"
                                  UseShortId="true"
     />
    

    Like this:

    03012

    Save the file (No need for IIS Reset!) That’s it! Refresh the page, you can see the “Sign in as different user” menu item now!
    03013


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful