[APIM] HTTP 400 - Subsciptions limit reached for same user.

NaviCoding 45 Reputation points
2024-08-08T11:15:03.86+00:00

I am trying to implement the ApiOps from Github and when i run the publisher pipeline i get an error from the management url for the APIM instance that "Subsciptions limit reached for same user". I do not quite understand what the issue is, since i can run that pipeline against the dev-instance but when running it againts an empty qa-instance of APIM i get that error.

The artifacts that the pipelines deploys is API's, Products, Subscriptions, Policy Fragments, Backend, Named Values, Gateways, Versionsets etc. Almost everything, but when deploying to QA i get that error message. But creating a subscription manually works fine in APIM. Not quite sure if that error is referring to my Azure Subscription or Subscriptions in APIM instance.

Some data :

URL : [https://management.azure.com/subscriptions/***/resourceGroups/rg-apim-qa/providers/Microsoft.ApiManagement/service/apim-qa-instance/subscriptions/[apim-sub-id]?api-version=2023-09-01-preview]

Responce :

failed with status code 400. Content is '{"error":{"code":"ValidationError","message":"Subscriptions limit reached for same user","details":null}}

Help me please.

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,133 questions
0 comments No comments
{count} vote

Accepted answer
  1. Nitish S 80 Reputation points
    2024-08-11T10:07:41.4533333+00:00

    Hi @NaviCoding , this is the error related to Subscriptions in APIM Instance, not the Azure Subscription in Azure. Each instance can only have 1 Subscription per scope per user (e.g. only 1 subscription for user xyz for Product Unlimited). If your APIOps is trying to push such subscription to an instance which already has one 'Unlimited Product' subscription for that user, it would fail with such error.

    This is probably an error in the DevOps script. Ideally it should have skipped such subscriptions from the pipeline, I'll suggest this fix in GIT but for now you simply have to remove the Unlimited subscription manually from target instance and try again.

    It'll work, but let me know !

    Screenshot 2024-08-11 at 3.34.53 PM.png

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.