Microsoft.Azure.NotificationHubs does not register Android and iOS Devices

Lukas Allmer 25 Reputation points
2025-07-08T13:03:11.65+00:00

We are running a .NET 4.8 server application that is handling APN and FCMv1 registrations for our Android and iOS Client devices. This server application uses the Azure Notification Hubs Nuget-Package to do so, while we construct the necessary DeviceInstallation data in the Clients.

For some time (a few days) we suddenly can't register new installations or update existing installations on Azure anymore. We have been using the following function to do so:

        public async Task<bool> CreateOrUpdateInstallationAsync(DeviceInstallation deviceInstallation)
        {
            // Error handling

            Installation installation = new Installation
            {
                InstallationId = deviceInstallation.InstallationId,
                PushChannel = deviceInstallation.PushChannel,
                Tags = deviceInstallation.Tags,
                ExpirationTime = DateTime.Now.AddDays(registrationTimeToLiveInDays)
            };

            if (installationPlatforms.TryGetValue(deviceInstallation.Platform, out NotificationPlatform platform))
            {
                installation.Platform = platform;
            }
            else
            {
                // Error handling
            }

            try
            {
                await hub.CreateOrUpdateInstallationAsync(installation);

                return await DoesInstallationExistsAsync(installation.InstallationId);
            }
            catch (Exception e)
            {
                // Error handling
                return false;
            }
        }

This function has worked as is for about a year.

We also tried registering the same installations using the Notification Hubs REST API directly, which yielded the same results. Using a test hub in the Azure portal we can see that the registrations seem to reach Azure according to the requests noted in the monitoring, but it doesn't show any devices as registered in the summary.

Are we doing something wrong or is Azure (West Europe) simply not working and we have to wait it out?

Many thanks in advance.

Azure Notification Hubs
Azure Notification Hubs
An Azure service that is used to send push notifications to all major platforms from the cloud or on-premises environments.
{count} vote

2 answers

Sort by: Most helpful
  1. Lukas Allmer 25 Reputation points
    2025-07-14T07:20:07.9266667+00:00

    As of last week, we changed nothing and registrations just work again.

    There was no notice from Microsoft or anything about an outage or any logs that would indicate what the error was.

    The main takeaway from this is in my opinion: If you use Azure Notification Hubs they sometimes just don't work and there's nothing you can do about it.

    2 people found this answer helpful.

  2. Shree Hima Bindu Maganti 6,040 Reputation points Microsoft External Staff Moderator
    2025-07-15T16:17:51.0533333+00:00

    Hi @Lukas Allmer
    Apology for your inconvenience.
    It seems that you experienced a temporary issue with registering installations in Azure Notification Hubs, which resolved itself after a few days. While it's not uncommon for cloud services to have intermittent issues, it's important to ensure that your implementation adheres to the guidelines provided by Microsoft.

    Ensure that all configurations, such as the notification hub name and platform credentials, are correct. Misconfigurations can lead to failures in registration.

    Occasionally, Azure services may experience outages or issues that are not communicated directly to users. It's a good practice to check the Azure status page for any reported incidents.

    Enhance your error handling to capture specific exceptions that might provide more insight into what went wrong during the registration process.

    f you have a test hub, continue to use it to isolate issues. This can help determine if the problem is with your code or the Azure service itself.

    If possible, review any logs or monitoring data available in the Azure portal to identify patterns or specific errors that occurred during the registration attempts.

    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.