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 https://provisioningapi.microsoftonline.com

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 proxy.mydomain.net with my actual UTM proxy address:

Invoke-WebRequest -Proxy http://proxy.mydomain.net:8080 -ProxyUseDefaultCredentials http://example.org

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.