WNS OAuth token request returns “invalid_client_id” for Package SID provisioned via Partner Center

Henning 0 Reputation points

We are unable to obtain an OAuth access token for classic Windows Push Notification Service (WNS). The token request to consistently fails with "invalid_client_id", although the Package SID is provisioned via Partner Center.

ENVIRONMENT

  • App type: UWP
  • Push technology: Classic WNS (Windows.Networking.PushNotifications)
  • Provisioning: App Registration automatically created via Partner Center (Branding page shows “Provisioned by Partner Center” with ProductId/ProductName)
  • Store Product ID: 9PDN4B640288
  • Package Family Name: BlueID.Klassenalarm_frdj7vb8tmanc

TOKEN REQUEST

Endpoint: POST Headers: Content-Type: application/x-www-form-urlencoded

Body:

grant_type=client_credentials client_id=ms-app://S-1-15-2-2132833467-887333386-1817602265-1493662439-293909472-1430548427-1592143602 client_secret=<valid secret value> scope=notify.windows.com

The raw request body was verified via Postman Console and is correctly encoded. No extra parameters (e.g. PFN) are sent.

RESPONSE

HTTP 400 X-WLID-Error: 0x80045AA0

{ "error": "invalid_client", "error_description": "Invalid client id" }

QUESTION Is there a known WNS provisioning or backend issue where a Package SID shown in Partner Center is not recognized by the WNS OAuth endpoint?

If so:

  • How can the WNS registration be refreshed or re-provisioned?
  • Is there a way to validate the Package SID against the WNS backend?
0 comments No comments

Sign in to comment

Answer recommended by moderator

Jack Dang (WICLOUD CORPORATION) 18,970 Reputation points Microsoft External Staff Moderator

Hi @Henning ,

Thanks for reaching out.

From what you’re describing, it looks like WNS is not recognizing the Package SID from Partner Center, which is why you’re seeing the invalid_client_id error. This can sometimes happen due to backend registration issues.

The best next step would be to open a support request with Microsoft Partner Center:

https://learn.microsoft.com/en-us/partner-center/support/schedule-support-appointment

When creating the request, be sure to include:

  • Your Package SID and Store Product ID
  • The exact OAuth request body you’re sending
  • Any timestamps and error messages you’ve received

Microsoft support can verify the backend status and, if needed, refresh or re-provision the registration so WNS recognizes the ID.

Hope this helps! If my answer was helpful - kindly follow the instructions here so others with the same problem can benefit as well.

  1. Henning 0 Reputation points

    Hi @Jack Dang (WICLOUD CORPORATION) ,

    thanks for your reply. I have lodged a support request.

    Best,
    Henning

  2. Jack Dang (WICLOUD CORPORATION) 18,970 Reputation points Microsoft External Staff Moderator

    Hi @Henning ,
    Thanks for your feedback.

    If my answer was helpful - kindly follow the instructions here so others with the same problem can benefit as well.


Sign in to comment

1 additional answer

  1. AI answer

    The error message "invalid_client_id" indicates that the client ID being used in the OAuth token request is not recognized by the WNS (Windows Notification Service). This can occur for several reasons, particularly if there is an issue with the provisioning of the Package SID in the Partner Center.

    Here are some steps to consider:

    1. Verify Package SID: Ensure that the Package SID you are using in the request matches exactly with the one provisioned in the Partner Center. Any discrepancies can lead to this error.
    2. Check App Registration: Since the app registration is automatically created via Partner Center, confirm that the registration is complete and correctly configured. Sometimes, the registration may not have propagated correctly.
    3. Refresh or Re-provision: If you suspect that the registration is not recognized, you can try to refresh or re-provision the WNS registration. This usually involves re-registering the app in the Partner Center or contacting Microsoft support for assistance with re-provisioning.
    4. Validate Package SID: Unfortunately, there is no direct way to validate the Package SID against the WNS backend through a public API. However, ensuring that the details in the Partner Center are correct and up-to-date is crucial.
    5. Contact Support: If the issue persists, consider reaching out to Microsoft support for further assistance. They can provide insights into whether there are any known issues with WNS provisioning or backend services.

    These steps should help you troubleshoot the "invalid_client_id" error when requesting an OAuth token for WNS.

    AI-generated content may be incorrect. Read our transparency notes for more information.
Sign in to answer

Your answer