Ran into this one recently. When accessing Office 365 via Exchange from Outlook 2013, an error pops up.
There is a problem with the proxy server’s security certificate. The name on the security certificate is invalid or does not match the name of the target site outlook.office365.com.
Outlook is unable to connect to the proxy server. (Error Code 0)
When using auto-configuration to set up the Exchange connection to Office 365 in Outlook, these proxy settings are automatically entered.
The URL is “outlook.office365.com” which appears to be what the error message is talking about. For some reason, it is unable to connect or it connects to the wrong server and the SSL certificate looks bad.
It took a while to pin down the solution, but AkikoS in this thread figured it out. Visit the “Internet options” control panel and make sure that the option to use a proxy server for the LAN is unchecked. (This appears in the “Connections” tab under the “LAN settings” button.)
Once the box is cleared, if you start Outlook again the problem should be resolved. In my case, something appears to be re-checking this box when the machine boots and that’s going to take a little more digging to figure out.
Update, October 25, 2014:
Problem started getting worse (proxy settings checkbox checked every few minutes). I used Process Monitor to track it down. It was a piece of adware that was trying to be tricky. Process Monitor indicated that a few different QuickBooks processes and an Akamai process were hosting a local proxy and setting the proxy checkbox. I ended up tracking it down to a service called “RocketTab” which had installed itself in C:\Program Files (x86)\Search Extensions. After uninstalling it, the problem went away.