Search code examples
office365cloudflareoutlook-restapi

SSL/TLS issue with subscribing to Office 365 push notifications on Cloudflare


I'm currently trying to subscribe to push notifications through the Office 365 API, specifically Outlook.

https://msdn.microsoft.com/en-us/office/office365/api/notify-rest-operations

However, whenever I try to execute a subscribe operation, it'll return the following error:

Notification URL \'https://interseller.io/valid/path?validationtoken=YTc5NDI1OTEtNDY1Yy00ODczLWExYjYtZmU0OGI3N2JjNjI0\' verification failed \'System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.\r\n at System.Net.HttpWebRequest.GetResponse()\r\n at Microsoft.Exchange.OData.Model.Notifications.PushNotification.PushSubscriptionCallbackUrlValidationHelper.SendRequestAndVerifyResponse(Uri callbackUrl, PushSubscription pushSubscription)\'.

I do run it through CloudFlare with SSL and was wondering if anyone knew:

  • Would buying a dedicated SSL resolve this? I assume that the rotation of keys is really screwing it up
  • How do you contact someone at Microsoft to report a bug like this?

Solution

  • After a couple of hours of reading up on how CloudFlare does SSL certificates, this error is caused with the SNI does not match your domain's SNI.

    e.g. CloudFlare's free SSL SNI is something like sni12345.cloudflare.net and because it does not equal interseller.io, the Office 365 API will cause it to fail.

    Subscribing to Cloudflare's Dedicated SSL Certificate solved this issue where they assign a brand new certificate that points the SNI to your domain.