This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How I got Powershell to connect to Office 365 from behind a standard proxy

I'm relatively new to UTM, Powershell and Office 365. My goal this morning was to use PowerShell to connect to my brand new Office 365 tenant and learn how to manage it, but I was very frustrated by my inability to connect. 

When running this line:

Connect-MsolService -Credential $credential

I would get this error:

There was no endpoint listening at

Checking my Sophos logs, I saw 407 authentication errors. My connections had no user name attached.

What got things working for me was to configure PowerShell to use proxy authentication. I entered this line (replacing with my actual UTM proxy address:

Invoke-WebRequest -Proxy -ProxyUseDefaultCredentials

After that, PowerShell continued to use "my" proxy settings, and I was able to connect to Microsoft Office365.

This thread was automatically locked due to age.
  • Hi Joe,

    Thanks for the information! I wonder if similar things could be used to fix Sage Software throwing it's toys out the pram when a proxy is set up with any level of authentication.

    Will explore!