Saturday, June 25, 2016

Azure Notification Hub unable to upload .p12 for APN

Hi All,

While i was working to setup Notification Hub for APNS, I got to a point to upload the certificate i created from apple developer account to the Azure portal.

I was getting the following error every time i upload my .p12 exported certificate to Azure:

This is the error message: Error updating the Notification Hub

I tried to get more detailed error message, So i jumped into the old portal and i was getting more detailed error as shown below:

Error Message: "SubCode=40000. Failed to validate credentials with APNS. Error is The credentials supplied to the package were not recognized"

After around couple of hours, i found out that the Azure reference to setup APNS was not accurate enough to say exactly what to export after you installed the certificate into your machine.

Here is what you need to do to successfully upload .p12 file into Azure:

1) From Keychain tool, Select Keys from the left pane.
2) Expand the target key that certificate contains, Right click on the certificate only and click on Export.
3) Set the password for .p12 file and save it to your disk.
4) Visit the Azure portal, Select the exported certificate (.p12) file and set the same password you set earlier in step #3 and click upload.

You will be able to successfully upload your certificate to Azure!


Post a Comment