Cannot delete APNS credentials

Leonardo 20 Reputation points
2024-02-15T16:03:43.99+00:00

Hello everyone, I am currently facing an issue with my NotificationHub service. I want to change the APNS subscription from a Certificate solution to the Token solution. When I try to remove the Certificate credentials and insert the new Token credentials I get this error : {"error":{"code":"BadRequest","message":"APNS credentials may not include both token and certificate"}} And impossible to continue the migration. Can you help me on that ? Thank you in advance !

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

Accepted answer
  1. brtrach-MSFT 15,351 Reputation points Microsoft Employee
    2024-02-17T06:01:58.3866667+00:00

    @Leonardo It seems that you are trying to remove the APNS certificate credentials and add the APNS token credentials at the same time, which is not allowed. The error message you received indicates that APNS credentials may not include both token and certificate.

    To resolve this issue, you will need to remove the APNS certificate credentials first and then add the APNS token credentials. Here are the steps you can follow:

    1. Go to the Azure portal and navigate to your Notification Hub service.
    2. Click on the "APNS" tab.
    3. Click on the "Delete" button next to the certificate credentials that you want to remove.
    4. Once the certificate credentials have been removed, click on the "Add" button to add the APNS token credentials.
    5. Follow the instructions to add the APNS token credentials.

    After you have added the APNS token credentials, you should be able to use them for your Notification Hub service.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Tommy Le 0 Reputation points
    2024-05-09T16:46:36.3333333+00:00

    I have a similar question. I have previously used gcmCredential. But, we're migrating to fcmV1Credential. How do we delete the gcmCredential key from bicep or script? I understand that we can do so from the portal but I'd like to do this in an automated way.

    0 comments No comments