Send notifications to individual users using Azure Notification Hub Send notifications to individual users using Azure Notification Hub azure azure

Send notifications to individual users using Azure Notification Hub


Azure notification hubs support tags, as in the example here.

In a Channel9 web-cast (which I can't find right now), they talked about leveraging tags in order to send notifications to specific users/groups.

Since I would like to leverage all the added value of the Notification Hubs, I will tag each entry with the username used in my application, and use that to send norifications to specific users by username.

EDIT: Here in the official Windows Azure documentation I found an example talking about exactly what I was looking to do. As an added bonus, they also gave me the idea to also tag with an installation ID, so you can have the same user getting native notifications on different devices with different operating systems.


Notification hub - for broadcasting notifications to a large mobile audience.

Push via mobile services - for specific notifications.Refer Q4 in the Q & A section here http://blogs.msdn.com/b/windowsazure/archive/2013/10/11/recap-mobile-services-azurechat.aspx

Push notification in mobile services


While others here have already covered using tags, there is another option that is not as well known. The Azure Notification Hubs REST API documentation on MSDN has the following Direct Send page: https://msdn.microsoft.com/en-us/library/azure/mt608572.aspx

Essentially, you add "direct" to the query string in the URL and provide the push token as a "*-DeviceHandle" header.

Users of this API do not need to use Registrations or Installations. Instead, users of this API manage all devices on their own and use Azure Notification Hub solely as a pass through service to communicate with the various Push Notification Services.

What does this mean? You need to get the device push token from the client before calling the ANH REST API (and re-use it efficiently).

One last note, for anyone who came across this previous but shied away from it: the documentation used to state that you had to contact support to opt into the feature, but it was recently updated to remove this caveat when I asked about it. :)