Windows (WNS) notifications - We are getting error Invalid WNS credentials

BRGHT 0 Reputation points
2023-11-08T13:00:09.82+00:00

Hello Team,

I am trying to setup Windows (WNS) notifications based on following Microsoft tutorial: Send notifications to Universal Windows Platform apps using Azure Notification Hubs (https://learn.microsoft.com/en-us/azure/notification-hubs/notification-hubs-windows-store-dotnet-get-started-wns-push-notification)

I am trying to setup Windows (WNS) for the app

We are getting error Invalid WNS credentials:

Error message: Error updating notification hub. Error. BadRequest. Message: Invalid WNS credentials.

The Package SID I'm using:

ms-app://s-1-15-2-xxxxxxxxxxxx...

What might cause the issue?

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.
264 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 22,416 Reputation points Microsoft Employee
    2023-11-10T20:03:29.2+00:00

    BRGHT, Thanks for posting this question. Typically,

    Just to highlight, typically the "Invalid WNS credentials" error message indicates that the Package SID or Security Key you are using to configure WNS for your notification hub is incorrect.

    Please double-check that you have entered the correct values for the Package SID and Security Key in the Azure portal.

    You may find these values in the Windows Dev Center dashboard for your app.

    Just to isolate, kindly ensure that you have selected the correct package type
    when you created your Package SID in the Windows Dev Center dashboard.

    Also, see checkout Push notification service request and response headers to ensure that your app server is using all custom headers as described.
    Notification request returns "400 Bad Request"

    Kindly let us know how it goes, I'll follow-up with you .