Share via

Azure Marketplace SaaS Subscription Error – Missing x-ms-marketplace-token

Sam John 0 Reputation points
2026-04-05T00:52:54.7333333+00:00

Hello

I am experiencing an issue while configuring a SaaS subscription from Azure Marketplace.

I subscribed to NinjaOne Automated Endpoint Management via Azure Marketplace. However, when I click on “Configure Account”, I am redirected to the onboarding URL, which fails with the following error:

It appears that the required x-ms-marketplace-token is not being generated or passed during the redirect process.

I have already tried the following:

  • Retried using different browsers
  • Cleared cache and used incognito mode
  • Attempted the process multiple times from the Azure portal
  • Accessed the “Configure Account” option directly from SaaS subscriptions

Despite this, the issue persists consistently.

Could you please help investigate:

  1. Whether the SaaS subscription provisioning is incomplete or stuck
  2. Why the marketplace token is not being generated/passed
  3. If there are any tenant, billing, or regional issues affecting this flow

Please let me know if you need any additional details such as Subscription ID, Tenant ID, or screenshots.

Looking forward to your assistance.Hello Azure Support Team,

I am experiencing an issue while configuring a SaaS subscription from Azure Marketplace.

I subscribed to NinjaOne Automated Endpoint Management via Azure Marketplace. However, when I click on “Configure Account”, I am redirected to the onboarding URL, which fails with the following error:

It appears that the required x-ms-marketplace-token is not being generated or passed during the redirect process.

I have already tried the following:

  • Retried using different browsers
  • Cleared cache and used incognito mode
  • Attempted the process multiple times from the Azure portal
  • Accessed the “Configure Account” option directly from SaaS subscriptions

Despite this, the issue persists consistently.

Could you please help investigate:

  1. Whether the SaaS subscription provisioning is incomplete or stuck
  2. Why the marketplace token is not being generated/passed
  3. If there are any tenant, billing, or regional issues affecting this flow

Please let me know if you need any additional details such as Subscription ID, Tenant ID, or screenshots.

Looking forward to your assistance.

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.


1 answer

Sort by: Most helpful
  1. Q&A Assist
    2026-04-05T00:53:16.7+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The error indicates that the publisher’s Resolve API call is missing the mandatory x-ms-marketplace-token header, which must contain the purchase token that Azure Marketplace passes on the landing-page redirect.

    From the documented flow:

    1. After the customer selects Configure account / Configure your account, Azure Marketplace redirects the customer to the publisher’s landing page with a token query-string parameter, for example:
      • https://contoso.com/signup?token=<token>
    2. The publisher must:
      • Read and URL-decode this token value from the landing page URL.
      • Call the Resolve API:
        • POST https://marketplaceapi.microsoft.com/api/saas/subscriptions/resolve?api-version=2018-08-31
        • Include the following headers:
          • authorization: Bearer <access_token> (publisher’s token)
          • x-ms-marketplace-token: <decoded token>
          • content-type: application/json
    3. If x-ms-marketplace-token is missing, malformed, invalid, or expired, the Resolve API returns HTTP 400.

    In this case, the 400 HeaderNotPresent with “Mandatory header missing” means the publisher’s backend is calling the Resolve API without the x-ms-marketplace-token header at all, even though the Marketplace redirect is expected to include the token parameter.

    What this implies for the subscription state and token handling:

    • The subscription can be in any supported state; the Resolve API is still callable. The 400 being returned is not due to subscription state, but due to a missing header.
    • The Marketplace token is generated by Microsoft and passed as the token query parameter on the redirect; the publisher is responsible for:
      • Extracting it from the URL.
      • Decoding it (for example, ab%2Bcd%2Fefab+cd/ef).
      • Supplying it in the x-ms-marketplace-token header when calling Resolve.
    • If the token were expired or malformed, the error would still be 400, but the description in the documentation explicitly calls out missing, malformed, invalid, or expired token as the 400 causes. The specific HeaderNotPresent message points to the missing header, not an issue in Azure Marketplace token generation.

    Given the documented behavior, the most likely root cause is on the publisher side (NinjaOne onboarding endpoint) rather than tenant, billing, or regional configuration:

    • The Marketplace redirect is expected to work for all supported tenants and regions.
    • Tenant or billing issues typically affect the ability to purchase or subscribe, not the presence of the token parameter or the x-ms-marketplace-token header in the publisher’s Resolve call.

    Recommended next steps based on the documented flow:

    1. Confirm that the SaaS subscription shows as not yet configured:
      • In Azure Portal, locate the SaaS resource and check the status text:
        • If it shows Configure your account on the publisher’s website, the purchase is created but configuration is incomplete.
    2. Engage the publisher (NinjaOne) with the exact error details:
      • Provide the 400 HeaderNotPresent error and note that their Resolve call to https://marketplaceapi.microsoft.com/api/saas/subscriptions/resolve?api-version=2018-08-31 is missing the x-ms-marketplace-token header.
      • Reference that they must:
        • Read the token query parameter from the landing-page URL.
        • URL-decode it.
        • Pass it as x-ms-marketplace-token in the Resolve API request.
    3. If the publisher confirms their implementation is correct but the issue persists, open a Microsoft support case for Marketplace/SaaS subscription lifecycle so support can:
      • Validate that the Marketplace redirect is correctly including the token parameter.
      • Check for any backend issues with the subscription or token issuance.

    Once the Resolve call succeeds (HTTP 200), the publisher receives the SaaS subscription ID and can then:

    • Complete configuration on their side.
    • Call the Activate Subscription API:
      • POST https://marketplaceapi.microsoft.com/api/saas/subscriptions/<subscriptionId>/activate?api-version=2018-08-31
      • With the required headers and a valid publisher authorization token.
    • Only after a successful Activate call does billing start.

    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.