Reputation: 75
I am using EWS api to develop an androd application on tablets to connect with office365. The app poll to office365 server to request the calendar information. However, sometime it is limited by the throttling policy when the app is installed on 15 devices and each device poll with 5-second interval. The server returns the message saying that it is busy.
EWS provides streaming subscription and push subscription. The streaming subscription is not what I am looking for because it allows only 10 connections to work at the same time (according to . https://msdn.microsoft.com/EN-US/library/office/dn458789(v=exchg.150).aspx) So push notification is a better choice.
When I tried to use push notification, our app is able to subscribe the calendar on office365. The server replies that the subscription is made successfully. Then, The app created a socket and listen for data from office365. However, no data is pushed from the office365 to our app when we create, modify an events on calendar.
We tried the scenario with Exchange2010 Sp2 in our local network, it worked just fine. So, we hypothesized that it is because of the network problem or network policy. We tried reconfiguring our router to allow port forwarding as well as shut down our firewall. It still does not work.
So the question is quite simple How to properly implement the push notification receiver for "office365".
Upvotes: 1
Views: 1169
Reputation: 1246
It's unlikely that PUSH notifications will work coming in from O365. Even if you do open your firewall port to the listening port you establish, there is still the matter of the routability of the URL you present to O365 for the notifications. E.g. if you give it "http://myserver:11111/pushhere" it probably cannot resolve "myserver" unless you have a public DNS entry for it. Even so, it's probably not a great idea to leave a port open to the web--at least in my company, the IT folks would never let me!
As to the 10 connection limit on streaming subscriptions, that can be worked around using impersonation. In fact for O365 impersonation is almost mandatory, IMO, to avoid the throttling that O365 has to do as a SaaS. This does take a little setup with PowerShell to cover all the MBs you need to subscribe for, but it's a one-time thing.
That said, streaming notifications are more complex to manage than good old PUSH. Especially for O365, you have to be aware of the Grouping Information you get via Autodiscovery and subscribe with only MBs in the same group on each connection. Also, you have a hard 200 max MBs per subscription that may or may not be a factor for you. The article you ref'ed above includes a lot of this in detail.
HTH & good luck!
Upvotes: 3