Share via

404 Error When Using List Subscriptions API

Eisenhaur, Liam 21 Reputation points
2021-10-29T18:25:09.08+00:00

I am getting a 404 error when trying to get the entire list of subscriptions from azure. I am using the https://management.azure.com/subscriptions?api-version=2020-01-01 rest api. At first I thought it might be an issue with the resourceUri, but now I am starting to think it might be an issue with the rest api I am using. Is this not the correct version or am I missing something?145065-image.png

Azure API Management
Azure API Management

An Azure service that provides a hybrid, multi-cloud management platform for APIs.

0 comments No comments

1 answer

Sort by: Most helpful
  1. AnuragSingh-MSFT 21,566 Reputation points Moderator
    2021-11-02T06:35:46.357+00:00

    Hi @Eisenhaur, Liam

    Welcome to Microsoft Q&A! Thanks for posting the question.

    I see that you are doing a POST request against the management URI. Can you please change the method to GET instead and try. Please refer to the doc here for more details, which specifies GET method for performing this operation.

    I did a sample test using REST Client extension in VS Code against the management URI and got the expected result when using GET as specified in the documentation. For POST, i see a 404 returned.

    145697-image.png

    Please me me know if you have any questions.

    ---
    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    Was this answer helpful?


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.