Logging in as a different user
When using default.master in SharePoint users have the “Sign in as Different User” menu option on the “Welcome” menu to login as a different user. This is useful when testing security etc.
This menu is often removed when customizing sites – clients we find often do not want these options displayed. So how can you add a link to allow this facility for testing?
The “Sign in as Different User” navigates to the /_layouts/AccessDenied.aspx page, which displays thus:

You’ll notice the link “Sign in as a different user”. From the browser status bar you can find the target of this link:

So, it turns out to login as another user you simply need to navigate to:
/_layouts/AccessDenied.aspx?loginasanotheruser=true
The standard browser username/password dialog box will be displayed without the “Access Denied” page being displayed to the user.
Excellent! Very helpful tip.
Robin
March 5, 2009 at 9:45 pm