I have issues running the Connect-MicrosoftTeams -Credential $UserCredential
command. I get the following error:
AADSTS50158: External security challenge not satisfied
My PowerShell Profile looks like:
netsh winhttp set proxy "http://myproxy.mydomain.com:9999"
$Wcl=New-Object System.Net.WebClient
$Creds=Get-Credential
$Wcl.Proxy.Credentials=$Creds
[system.net.webrequest]::defaultwebproxy = new-object system.net.webproxy('http://myproxy.mydomain.com:9999')
[system.net.webrequest]::defaultwebproxy.credentials = $Creds
I can see the Connect-MicrosoftTeams
come through in Fiddler. Oddly, the host in Fiddler is actually the actual Connect-MicrosoftTeams
command. The error in Fiddler is
HTTP/1.1 407 Proxy Authentication Required
and I can see the following Cookie
Proxy-Authenticate: BASIC realm="My super secret Realm"
I can get to all other Office 365 workloads that I have tried. How do I get Connect-MicrosoftTeams
to use my proxy credentials?