Why “Sign in as Different User” removed in SharePoint?

Please be careful when using the “Sign in as Different User” in SharePoint 2013. This feature removed directly since SharePoint 2013, because of allows users which have more than one AD account to login with a different account.

You will get the next error message:

In the ULS log will find the next exception:

System.ArgumentException: Exception of type ‘System.ArgumentException’ was thrown. Parameter name: encodedValue at Microsoft.SharePoint.Administration.Claims.SPClaimEncodingManager.DecodeClaimFromFormsSuffix(String encodedValue) at Microsoft.SharePoint.Administration.Claims.SPClaimProviderManager.GetProviderUserKey(IClaimsIdentity claimsIdentity, String encodedIdentityClaimSuffix) at Microsoft.SharePoint.Administration.Claims.SPClaimProviderManager.GetProviderUserKey(String encodedIdentityClaimSuffix) at Microsoft.SharePoint.ApplicationRuntime.SPHeaderManager.AddIsapiHeaders(HttpContext context, String encodedUrl, NameValueCollection headers) at Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.PreRequestExecuteAppHandler(Object oSender, EventArgs ea) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

This is a security issue, because of the page content shows cached information from the previous user.

To avoid the issue, you have to logoff/logon in Windows or delete cookies and website data in your browser, and re-open it to Sign in as a different user.

https://blogs.technet.microsoft.com/stefan_gossner/2012/01/19/be-careful-when-using-the-sign-in-as-different-user-feature-in-sharepoint/

https://support.microsoft.com/en-nz/help/2988406/system-argumentexception-exception-when-you-sign-out-of-a-sharepoint-2

How to connect to SPOService behind company proxy

Function Connect-SPOServiceBehindProxy{
[cmdletbinding()]
param(
    [parameter(Mandatory=$true,Position=0,ValueFromPipeline=$true)][string]$AdminUPN,
    [parameter(Mandatory=$true,Position=1,ValueFromPipeline=$true)][string[]]$Organization
    )
Begin{
$cred = [System.Net.CredentialCache]::DefaultCredentials
[System.Net.WebRequest]::DefaultWebProxy.Credentials = $cred
}

Process{
$Credential = Get-Credential -UserName $AdminUPN -Message "Type the password for ($AdminUPN)."
Connect-SPOService -Url https://$Organization-admin.sharepoint.com -Credential $Credential
}
}

https://docs.microsoft.com/en-us/powershell/sharepoint/sharepoint-online/connect-sharepoint-online?view=sharepoint-ps