Azure Notifcation Hub -> Push notifications authorization was denied in Xcode debug

PaulSu 1 Reputation point
2022-10-20T14:20:09.357+00:00

In my iOS apps written natively in Swift using Swift package manager. I am 100% of the time able to send a push using the Azure portal in a sandbox environment, however, in Xcode 14.0.1 (14A400) I am seeing "Push notifications authorization was denied." for my sandbox "debug" release.

2022-10-20 10:12:51.564028-0400 <app name>[13845:569398] Internet connection is up.   
2022-10-20 10:12:51.743489-0400 <app name>[13845:569398] Registered for push notifications with token: <token>   
2022-10-20 10:13:02.609123-0400 <app name>[13845:569725] Push notifications authorization was denied.   
2022-10-20 10:13:02.641600-0400 <app name>[13845:569398] Registered for push notifications with token: <token>   

In the Azure portal I can successfully send a push, and I get the push on the device, and I see this in the portal

The Notification was successfully sent to the Push Notification System   

Why is MSNotificationHub posting "Push notifications authorization was denied." I get this message after I tap "allow" to opt into push notifications on application launch.

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.
311 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 17,886 Reputation points
    2022-10-28T00:05:51.137+00:00

    Hi @PaulSu ,

    Thank you for reaching out to Microsoft Q&A. We apologize for the inconvenience this issue caused.

    You mentioned you are normally able to send a push using the Azure portal in a sandbox environment, was this because you were previously using XCode 13 or was it always working in v14? Also, are you getting any other additional errors message other than "push notifications authorization was denied"?

    Best,
    Grace

    0 comments No comments

Your answer

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