Solving that pesky HTTP 400 error when connecting to Office 365