Unable to update FCMV1 credentials on Azure

Zack Frankowski 20 Reputation points
2025-06-27T23:10:22.4+00:00

Hi - I'm trying to update my FCMv1 credentials on Azure Notification hubs. Here is my JSON file.

project_id: REDACTED

private_key: -----BEGIN PRIVATE KEY-----\nREDACTED\n-----END PRIVATE KEY-----\n

client_email: REDACTED.iam.gserviceaccount.com

I keep getting bad request.

User's image

I have FCMV1 enabled on Google Cloud
User's image

I'm new at Notification Hubs but I was hoping to get it working anyways. I was wondering if anyone can help me out? It's most frustrating!

Thanks - Zack

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.
385 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bhargavi Naragani 6,365 Reputation points Microsoft External Staff Moderator
    2025-07-01T07:23:48.1033333+00:00

    Hi Zack Frankowski,

    From the error you’re seeing: "BadRequest: Invalid FcmV1 credentials", this usually means Azure is not able to validate the service account credentials due to one of the following common reasons:

    Even though the Firebase Cloud Messaging API (V1) is enabled, Azure expects the full, unmodified service account JSON file in a specific format and any deviation (like extracting fields manually or malformed line breaks) will cause this error.

    1. Generate the correct service account key:
      • Go to Google Cloud Console – Service Accounts.
      • Choose your Firebase project.
      • Click “Create Service Account” (or select an existing one).
      • Go to Keys => Add Key => Create new key (JSON).
      • This will download a .json file with your credentials.
    2. Paste credentials into Azure: In the Azure portal, go to your Notification Hub, Navigate to: Settings => Google (GCM/FCM) Remove any legacy FCM server key if one is present.
    • Choose the "Firebase Cloud Messaging (V1)" option.
    • From your downloaded .json: Paste the project_id, client_email, and full private_key exactly as-is (including \n line breaks). Save the configuration.
    1. Make sure the service account has the Firebase Admin SDK role or Editor/Owner permissions under IAM.

    Note:

    • Do not edit or reformat the JSON.
    • Ensure Firebase Cloud Messaging API (V1) is enabled in Google Cloud Console – APIs & Services.
    • Avoid pasting individual fields, Azure needs the full-service account format.

    https://learn.microsoft.com/en-us/azure/notification-hubs/configure-google-firebase-cloud-messaging

    Hope this helps, if you have any further concerns or queries, please feel free to reach out to us.


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.