PushNotifications: Upgrade to FCMv1 is not delivering Templated Notifications from Azure

Smitha Kalluparambil 85 Reputation points
2024-04-19T14:57:24.39+00:00

Using this link GCM/FCM notifications to FCM v1. I am trying to migrate from GCM/FCM notifications to FCM v1.

From the guide, I -

  1. Configured the Firebase Service Account Credentials in Azure Notification Hub.
  2. Updated backend SDK C# code use FCM v1 platform during installation & registration of push notification.
  3. Verified that the device is actually registered in notification hub (by getting registrations from notification hub).
  4. Checked that Installation is now having the new Platform : FcmV1 instead of Gcm
  5. Verified that notification is delivered to app when sent from firebase console.

The problem is:

  1. I am able to call SendFcmNativeNotificationAsync() and send a notification to the registered device.
    1. This is my template according to the migration documentation. "{ "message" : { "notification" : { "body" : "$(message)", "title" : "Test" }}}" and my call to templated notification is $NotificationOutcome = $client.SendTemplateNotificationAsync( $templateParameterDictionary, '$InstallationId:{61D21000-XXXX-}').Result
  2. But I am not able to call SendTemplateNotificationAsync() and send a notification to the registered device.
  3. When sending notification from "Test Send" in Azure Portal, it does not get delivered.
  4. When sending template notification from code (C# - Microsoft.Azure.NotificationHubs nuget), it shows same error.
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.
325 questions
{count} votes

Accepted answer
  1. ajkuma 26,636 Reputation points Microsoft Employee
    2024-05-14T18:40:22.3+00:00

    To post an update:

    Our engineering team have completed the bug fix and will begin rolling this update today. It will be deployed to all the regions in a phased manner.  However, we don't have a concrete ETA to provide for the deployment of the update across all regions.

    We value your patience and cooperation throughout this process.
    I completely understand the inconvenience this has caused, and I extend our sincere apologies for the trouble it has brought about.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. srilatha cingireddy 0 Reputation points
    2024-06-10T11:03:37.7466667+00:00

    Issue is solved for us, able to use below implementation without any change from client side.

    User's image

    Only change from Server side is installation of devices using the platform FCMv1 and change in the body for the message template. Below is the modified request from server for installation. Highlighted in bold are the changes.

    {

    "platform": "FcmV1",

    "pushChannel": "$pushChannel",

    "installationId": "$installationId",

    "pushChannelExpired": false,

    "expirationTime": "9999-12-31T23:59:59.9999999Z",

    "tags": [

    "$installationId"

    ],

    "templates": {

    "MessageTemplate": {

    "body": "{\"message\":{\"notification\":{\"title\":\"$(title)\",\"body\":\"$(body)\"}}}",

    "tags": [

    "MessageTemplate"

    ]

    }

    }

    }@Smitha Kalluparambil Thank you so much!!


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.