Sometimes it happens that you are already logged into some SharePoint site via browser credentials (ex.: via domain credentials), but when you wish to access a particular site you see the ‘Unauthorized’ or ‘Sorry …’ error message. The account you are logged into does not have access to that particular site.
Even if you know valid credentials to that site, you cannot simply log out (sign out) and log in (sign in) with proper credentials.
The simple solution is to add the following parameter to the site’s URL:
[site url] /_layouts/closeConnection.aspx?loginasanotheruser=true
An example will look like:
Credit goes to Kuba 🙂
The post was originally published by Tomasz on his own blog Ordo Rerum: https://ordorerum.wordpress.com/2016/09/09/sharepoint-log-out/. For more hints like that go to http://ordorerum.wordpress.com.