The Token obtained from the Token Provider is wrong – Azure Notifications

The Error

“The Token obtained from the Token Provider is wrong”. Working with WinUI3 I came to the conclusion that Azure Notification Hub WNS Raw notification functionality just wasn’t supported yet. But digging deeper this is a genuine issue. Wiring up the Azure notification endpoint/channel successfully I was left scratching my head when sending a test notification from Azure Notification Hub and receiving the following error

PackageCertificateFileKey

There’s very little on this issue when doing a google search on “The Token obtained from the Token Provider is wrong”. This is caused by a self signed certificate entry in the csproj file. Mainly the <PackageCertificateFileKey>. If you remove that element you’re good to go.

If anyone knows how you can add an Out of Process Background Task to a WinUI3 project let me know as I tried and failed. It looks like it’s currently unsupported.

This is all part of discovery work leading up to a multi-platform desktop app comprising of MAUI with BlazorWebView utilizing React components with Push Notifications and tray icon.

One Comment on “The Token obtained from the Token Provider is wrong – Azure Notifications

Leave a Reply

%d bloggers like this: