Get subscription API is not working.

Amir Sohail
401
Reputation points
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
{count} votes
We are trying to repro this scenario at our end. If you have any business critical issue please Open a ticket by visiting the Azure Admin Center or visit the Microsoft 365 Admin Center and use the Support menu to Open a service request.
Has your original subscription been deleted?
subscription is already created I need a subscription list and get subscription list is not working
response is empty : "value": []
@CarlZhao-MSFT subscription is exist but the list of subscriptions is empty when I call https://graph.microsoft.com/v1.0/subscriptions API a few days earlier its worked fine but now it's not working
I need the list of created subscriptions
https://graph.microsoft.com/v1.0/subscriptions
"error": {
"code": "ExtensionError",
"message": "Operation: Create; Exception: [Status Code: Conflict; Reason: A subscripton already exists. It must be deleted before a another can be made.]",
"innerError": {
"date": "2022-01-25T09:07:22",
"request-id": "6a7df85b-0b69-4b4c-97de-da4b8839437c",
"client-request-id": "6a7df85b-0b69-4b4c-97de-da4b8839437c"
}
}
}
We will check on the logs and investigate it and update you accordingly.
Also experiencing this exact issue. The API calls to https://graph.microsoft.com/v1.0/subscriptions are no longer returning anything (empty array.) Our application calls this API to look up existing subscriptions to know if new ones need to be created. The issue is resulting in duplicate subscription being added which causes problems for our users.
As far as I can tell this issue was introduced in the last ~36 hours with no code change to our application.
I'm getting the same problem. I can create a subscription easily enough, and I can get the subscription details ONLY if I include the id in the call. But if I don't capture the id upon subscription creation, I've got an outstanding subscription that I can't delete. This will eventually cause throttling problems, but more importantly creates duplicate notifications because my app expects to delete all existing subscriptions before creating new ones during specific routines.
In other words:
Same issue here
I have the same issue, made a thread about it today as well as I couldn't find yours.
Subscriptions goes through successfully but doesn't exist when trying to get them through the /subscriptions endpoint.
Wanted to share this info after researching the issue a bit further.
When initially calling the mentioned API method, the results are as follows, despite there being known subscriptions present
Notice the @odata.nextLink property - I have found that following these links repeatedly as they are provided in response does eventually get you to your subscriptions. Note that for me to see them I had to go through 5-10 nextLinks, and at times continuing to skip through empty pages, but I do eventually find the subscriptions.
This seems more like a workaround and I definitely still believe this to be a bug in Graph, as the nextLink should not be necessary unless there is a full page of results already returned. Hope this helps others.
Same for me. The next link itself is valid, but it will return an empty value array a lot of times.
We are Unable to repro the issue, We tried with Application as well as Delegated permission, It's working fine for us. Could you first create the Subscription then call the Graph API for Getting the List of Subscription?
Graph API:- GET https://graph.microsoft.com/v1.0/subscriptions
Hello @Sam Nutkins , @Amir Sohail , @Billy Smith , @Gustavo Vargas , @Bence Gazder ,
Could you please share the request and response details with it's request id, so that we can check it from our end.
Thanks!!
The issue is already solved on our end, I cannot reproduce it.
When this problem is going to be resolved?
I've never seen this API call working:
https://learn.microsoft.com/en-us/graph/api/subscription-list?view=graph-rest-1.0&tabs=http
Hello @Oleksii Burchynskyi , We are Unable to repro the issue, We tried with Application as well as Delegated permission, It's working fine for us. Could you first create the Subscription then call the Graph API for Getting the List of Subscription?
Graph API:-
Thanks!!
Sign in to comment
9 answers
Sort by: Most helpful
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"
thanks
Thank you very much!
Sign in to comment
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
@Amir Sohail - Could you please confirm if your issue has resolved with above suggestion or still looking for any help?
This does not solve the issue, because 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" pretty fast.
@ChetanSharmamsft
This is not documented anywhere on the list subscriptions page. The document states "If successful, this method returns a 200 OK response code and a list of subscription objects in the response body".
An empty values array (especially on the first page) leads the user to conclude that there are no subscriptions. As a developer, if I create one subscription and my request for a list of subscriptions returns an empty set, then I must assume that the subscription list is broken. Pagination is not a solution for query timeouts - this should return a response code other than 200 (maybe 202) and a follow up link.
Furthermore, I echo @Bence Gazder 's sentiment regarding throttling...requiring the client to repeatedly send requests is an undue burden and further reduces the client's ability to work within this environment.
To be clear, our development team has been forced to consider the possibility of migrating subscriptions for our products to other platforms because of this apparent failure.
Sign in to comment
List Subscription is currently not working out and giving out empty array as response.
Sign in to comment
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.
@venkat - Is there any update on the investigation part ?
Sign in to comment
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"
Thankyou
Sign in to comment
Activity