Get subscription API is not working.

Amir Sohail 411 Reputation points
2022-01-25T07:16:56.7+00:00

We have created a subscription for users and its worked fine for us but currently, we are facing an unexpected issue related to getting a subscription because want to delete the previous subscription and create a new one for deletion we need a subscription id and get a subscription is not working let me share screenshots

168191-createsubscription.jpg

168150-get-subsc.jpg

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,473 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,816 questions
{count} votes

9 answers

Sort by: Most helpful
  1. Dan Espich 41 Reputation points
    2022-06-06T18:52:59.28+00:00

    I had to use this code to get all my subscriptions now. (sorry it won't let me post the actual code because it looks "suspicious"

    208861-screenshot-2022-06-06-145217.png

    5 people found this answer helpful.

  2. venkat 116 Reputation points
    2022-01-26T19:12:51+00:00

    There looks to be a non-empty @OData.nextLink in the response given in the screenshot. Could you please make a call using the nextLink to retrieve more results?

    Sometimes backend queries timeout and Database give the next link for continuing the query from the instance of the previous query result. Clients need to use the nextLink to navigate all pages

    4 people found this answer helpful.

  3. Dipesh Jadhav 21 Reputation points
    2022-01-27T20:08:01.917+00:00

    List Subscription is currently not working out and giving out empty array as response.

    1. For now as a work around you can do GET Subscription/ID to get the subscription. ( you will get the ID in response when you create the subscription you can store this ID and use it later when you want)
    2. Along with empty array you will receive odata.NextLink , you need to traverse each page till the end of pagination to find all the active subscription.
    4 people found this answer helpful.
    0 comments No comments

  4. venkat 116 Reputation points
    2022-01-27T20:25:26.33+00:00

    Thanks for all the reports!

    On Monday 2022/1/24, we were seeing lots of “Invalid Continuation Tokens” from CosmosDB resulting in 500’s returned to the client. This lasted for about 24 hours then dissipated. We’re not seeing any occurrence of this issue currently.

    Zero results with a continuation token is not uncommon, historically our service returns these frequently. However, starting earlier this week (2022/1/24), we’ve had a sharp increase in the response, roughly 10x. As reported here, the tokens are valid and enumerating them will supply the full result sets but there are many more of them to process.

    We are investigating the issue with the help of the CosmosDB support team.

    4 people found this answer helpful.

  5. 2022-06-14T15:57:27.19+00:00

    a lot of empty pages are returned. I have to make ~50 requests just to get 2-3 subscriptions and get to the end of the pagination. With this many requests, I will reach "429 - Too many Requests"

    3 people found this answer helpful.