"Sorry, something went wrong" when trying to sign in as another user

%3CLINGO-SUB%20id%3D%22lingo-sub-1889162%22%20slang%3D%22en-US%22%3E%22Sorry%2C%20something%20went%20wrong%22%20when%20trying%20to%20sign%20in%20as%20another%20user%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1889162%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%202%20SPO%20sites%2C%20siteA.sharepoint.com%20and%20siteB.sharepoint.com.%20I%20have%20different%20account%20on%20each%20site.%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20login%20to%201%20site%20(siteA)%2C%20then%20open%20the%20other%20site%20(siteB)%20on%20the%20same%20browser%2C%20the%20following%20screen%20is%20shown%20which%20is%20expected.%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%221.JPG%22%20style%3D%22width%3A%20870px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F233672i146039151FF5CB9D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%221.JPG%22%20alt%3D%221.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%2C%20clicking%20on%20the%20link%20%22%3CA%3EClick%20here%20to%20sign%20in%20with%20a%20different%20account%20to%20this%20site.%22%3C%2FA%3E%26nbsp%3Bshows%20an%20error%20page%20and%20the%20URL%20is%20appended%20with%20the%20following%20%22_layouts%2F15%2Faccessdenied.aspx%3Floginasanotheruser%3Dtrue%26amp%3BSource%3D%252F%22%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%222.JPG%22%20style%3D%22width%3A%20910px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F233673i5488BDD387E5D70C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222.JPG%22%20alt%3D%222.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EClearing%20the%20browser's%20cookies%20and%20cache%20works%20as%20expected%2C%20but%20if%20any%20of%20the%20site%20is%20logged%20in%20first%2C%20I%20can't%20sign%20in%20as%20another%20user.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20impacts%20my%20Powershell%20app%20which%20uses%20Connect-PnPOnline%20with%20the%20parameter%20-UseWebLogin%20because%20clearing%20cookies%20and%20cache%20on%20all%20browsers%20doesn't%20log%20my%20account%20out.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1889162%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Contributor

I have 2 SPO sites, siteA.sharepoint.com and siteB.sharepoint.com. I have different account on each site. 

When I login to 1 site (siteA), then open the other site (siteB) on the same browser, the following screen is shown which is expected. 

1.JPG

 

However, clicking on the link "Click here to sign in with a different account to this site." shows an error page and the URL is appended with the following "_layouts/15/accessdenied.aspx?loginasanotheruser=true&Source=%2F"

2.JPG

Clearing the browser's cookies and cache works as expected, but if any of the site is logged in first, I can't sign in as another user. 

 

This impacts my Powershell app which uses Connect-PnPOnline with the parameter -UseWebLogin because clearing cookies and cache on all browsers doesn't log my account out.

 

 

 

 

 

 

0 Replies