How to troubleshoot PnsErrorDetailsUri missing issue in Notification Hub telemetry API
Published Feb 01 2022 09:32 PM 1,358 Views

As suggested in the official document, we could use Get Notification Message telemetry REST API when we have issue/failure with pushing notifications in the Azure Notification Hub. We can use this API to review and monitor the pushed notifications. There is one prominent property named PnsErrorDetailsUri for our troubleshooting which indicates the details of error reported by PNS. However, the PnsErrorDetailsUri might not be found in the response payload sometimes when we use SDK which blocks our investigation. This article provides some troubleshooting threads to narrow down why we can’t invoke Telemetry API successfully or get PnsErrorDetailsUri property while invoking this API.


Troubleshooting Steps:

1.Please check the pricing tier of your Notification Hub firstly. The telemetry API is only available for Standard tier Notification Hub.


2.If no errors were reported by a PNS, the PnsErrorDetailsUri property will not be included in the response payload. Please kindly refer to multiple common errors and possible reasons of this API.


3.Generally, state of message progress could be following values:




If there is any issue while publishing notifications, PNS error details can be found from PnsErrorDetailsUri property after the associated send operation is complete. Please verify if the status tag is Completed in the response payload. The PnsErrorDetailsUri won’t show up when the message is in other statuses.


<NotificationDetails xmlns= xmlns:i=>

  <NotificationId>{Your message id}</NotificationId>

  <Location>sb://{Your namespace}{your hub name}/messages/{your message id}?api-version=2015-04</Location>





  <NotificationBody>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;toast&gt;&lt;visual&gt;&lt;binding template="ToastText01"&gt;&lt;text id="1"&gt;Hello from a .NET App!&lt;/text&gt;&lt;/binding&gt;&lt;/visual&gt;&lt;/toast&gt;</NotificationBody>












  <PnsErrorDetailsUri>{Blob uri}</PnsErrorDetailsUri>



4.If the PnsErrorDetailsUri value could not be found in the response payload after ruling out above possibilities, please kindly refer to following considerations:


A. While calling REST API directly, please make sure you are setting API version as 2016-07 and above because the PnsErrorDetailsUri requires Api-Version 2016-07 at least.



B.While calling REST API via SDK, the underlying request may not follow API pattern. For example, we are using historical version 1.0.3 of Microsoft.Azure.NotificationHubs package, there isn’t particular parameter of API version can be passed easily probably. 



You could capture the details of testing request by Fiddler tool or other web debugging proxy server tool so that you could decrypt the https request data and verify the specific API version which is used in SDK method by default.  Please kindly enable the HTTPs capture feature by the following options(Tools --- Options)







Once the pushing message is triggered, we could check the used API version in the detailed raw data of specific request. As shown below, 2015-04 is used so that we could not get the PnsErrorDetailsUri property successfully.




After upgrading the latest SDK version to 4.1.0, the underlying invoked API version is upgraded as well.






Once we get the value of PnsErrorDetailsUri, we could use the Azure Storage API to read the blob.

Version history
Last update:
‎Feb 01 2022 10:46 PM
Updated by: