Search code examples
azureazure-notificationhub

View registrations on Azure Notifications hub


I have created an Azure notifications hub and an API that allows users to register for notifications via the API. This all seems to work without any errors, but I cannot find a way to interrogate the notifications hub for registrations. Can some one tell me how to get a list of all current registrations? Ideally I would just do this in the Azure Portal, but I cannot see anything in there.


Solution

  • You can use NotificationHubClient.GetAllRegistrationsAsync(int) method [1] to get all registrations.

    [1] https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.notificationhubs.notificationhubclient#Microsoft_Azure_NotificationHubs_NotificationHubClient_GetAllRegistrationsAsync_System_Int32_