question

JanGranqvist-7834 avatar image
0 Votes"
JanGranqvist-7834 asked RostovskiyNikita-9885 answered

Graph change notification for Teams presence returns 500 InternalServerError

Hi all.

Have an app(C#) that subscribes on presence data through the graph API towards Teams.
Noticed today that the app receives 500 InternalServerError when re-subscribing for events.

 Status Code: InternalServerError
 Microsoft.Graph.ServiceException: Code: ExtensionError
 Message: Operation: Create; Exception: [Status Code: InternalServerError; Reason: Subscription failed for some users. Remove the failing users and retry. (e7c5bd5e-494e-469d-850d-b7c8c03545a5)]
 Inner error:
     AdditionalData:
     date: 2021-03-11T14:23:27
     request-id: c1806b30-afa5-4b1b-ab00-2c49b75935fd
     client-request-id: c1806b30-afa5-4b1b-ab00-2c49b75935fd
 ClientRequestId: c1806b30-afa5-4b1b-ab00-2c49b75935fd

However, the user in question is still within the AD, but the account has been disabled.
Is this an error message to be expected?
If so, are we talking string comparison here to understand the problem at hand?

TIA
/Janne

office-teams-app-devmicrosoft-graph-change-notifications
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@JanGranqvist-7834

According to your description, your issue is more related to development, which we do not support. I will add "office-teams-app-dev" tag and remove "office-teams-windows-itpro". Hope you get better response.

0 Votes 0 ·

Re-subscribing - Are you trying to re-subscribe same presence data? Could you please explain in more detail?

0 Votes 0 ·
JanGranqvist-7834 avatar image
0 Votes"
JanGranqvist-7834 answered NikithaMSFT-0176 commented

Yes, I'm trying to re-subscribe with the same list of user-ids, that has not changed.
The re-subscription have been working for months with this list.
At new years-eve, one of the user's account((e7c5bd5e-494e-469d-850d-b7c8c03545a5)), part of the list got disabled.

However, the re-subscription still worked until last week when the response was 500 InternalServerError.

Apparently there ia a grace period within azure AD on user accounts and therefore the error response got sort of "delayed".

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

We are not able to repro the issue at our end. Could you please check this sample?

0 Votes 0 ·
JanGranqvist-7834 avatar image
0 Votes"
JanGranqvist-7834 answered NikithaMSFT-0176 commented

Sorry for my late reply.

Yes, I've looked into the sample, but the problem is not related to the actual subscribe or re-subscribe.

I noticed that the problem also exists in the initial subscription when trying to include a user with a disabled account.
If I exclude the user with the disabled account on subscribe/re-subscribe there is no issue,

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Disabled account? could you explain a bit more?

0 Votes 0 ·
JanGranqvist-7834 avatar image
0 Votes"
JanGranqvist-7834 answered MuhammadHamza-8764 edited

I'm talking about the property 'Microsoft.Graph.User.AccountEnabled' from 'GET https://graph.microsoft.com/v1.0/users', where in this instance was set to false for the user in question ,which is a consequence that an administrator disabled the account from the azure portal.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Yo cannot get the details of disabled account.

0 Votes 0 ·

Hi! i have removed all the disabled users, still getting error "subscription failed for some users, please retry". I am using graph api and calling /subscriptions API. passing tenant ID in resource any suggestions please?159298-teamssubscriptionerror.png


0 Votes 0 ·
RostovskiyNikita-9885 avatar image
0 Votes"
RostovskiyNikita-9885 answered
  1. I see some ID in the end of the error message: "... Remove the failing users and retry. (e7c5bd5e-494e-469d-850d-b7c8c03545a5)]". The ID in brackets is ID of a user that causes the error when you try to refresh subscription. I had the same problem on my project. The solution is to detect this particular error and parse user IDs in the bracket (yes, there can be more than one ID), and exclude them from the list.

  2. The reason why refreshing subscription is not failed for some time after user was deleted is that user data is actually removed after 1 month. I guess that's why you will not receive any errors for a long time after user was disabled.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.