Microsoft.Graph.ServiceException: Code: ExtensionError - InternalServerError

Kloth, Ralf 1 Reputation point
2022-12-09T08:41:09.107+00:00

When deleting (or creating) a subscription for presence notifications sometimes the request takes 25 seconds and we see the error "InternalServerError". The strange thing is that we run this request every 30 minutes and most of the time it runs without problems and sometimes the error (randomly) occurs.
Does anybody know what the problem is? Or how I can analyze the problem?

The exception returned is:
Status Code: InternalServerError
Microsoft.Graph.ServiceException: Code: ExtensionError
Message: Operation: Delete; Exception: [A task was canceled.]
Inner error:
AdditionalData:
date: 2022-12-09T07:00:26
request-id: 90753951-3b87-4ed4-9b34-4b81b76c9333
client-request-id: 90753951-3b87-4ed4-9b34-4b81b76c9333
ClientRequestId: 90753951-3b87-4ed4-9b34-4b81b76c9333

at Microsoft.Graph.HttpProvider.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
at Microsoft.Graph.BaseRequest.SendRequestAsync(Object serializableObject, CancellationToken cancellationToken, HttpCompletionOption completionOption)
at Microsoft.Graph.BaseRequest.SendAsyncT
at Microsoft.Graph.SubscriptionRequest.DeleteAsync(CancellationToken cancellationToken)
at PresenceHubAboManager.Services.AboManagerService.Run() in C:\work\Source\Repos\AurenzPresenceHub\PresenceHubAboManager\Services\AboManagerService.cs:line 238

In Application Insights the error shows like this (you can see that the request took 25 seconds)!
268873-image.png

Microsoft Teams | Development
Microsoft Teams | Development
Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs
Microsoft Security | Microsoft Graph
{count} votes

1 answer

Sort by: Most helpful
  1. HarmeetSingh7172 4,831 Reputation points
    2023-01-04T22:15:10.777+00:00

    Hello @Kloth, Ralf

    Looking at the exception details, it seems like there could be a possibility that the actual subscription was originally removed, and notifications are not being sent. Sometimes, subscriptions could be orphaned in the system. For this, we need to wait for the subscription to be removed properly from the system. Also, please note that the "free" azure accounts don't have teams' licenses, one guess that the subscription call will fail with something.

    In case if you are still experiencing this issue, I would recommend you to raise a support case with Microsoft Graph, a Support Engineer will be able to assist you better. You can raise support ticket from http://aad.portal.azure.com/ or https://admin.microsoft.com/#/support/requests.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.


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.