graph api subscription always get validationToken

Baoxin BX6 Li 11 Reputation points
2024-08-12T06:18:07.35+00:00

i create a subscription for teams presences, it works well for a long time.

today, i found the code can not get the users presences, it always got the validationToken.

if (!string.IsNullOrEmpty(validationToken))
{
    var token = Request.Query["validationToken"];
    return Content(token, "text/plain");
}

Microsoft Security | Microsoft Graph
{count} vote

2 answers

Sort by: Most helpful
  1. Anonymous
    2024-08-13T02:26:06.9166667+00:00

    Hi @Baoxin BX6 Li

    Please check whether the subscription has expired. If you need to renew or re-subscribe, please check the document for the validity of the subscription.

    https://learn.microsoft.com/en-us/graph/api/resources/subscription?view=graph-rest-1.0#subscription-lifetime

    Hope this helps.

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


  2. Morten Tryfoss 0 Reputation points
    2024-08-13T13:24:51.7633333+00:00

    We're in the same situation. Our service has been using presence subscription successfully for several years, but on Saturday evening (European time) the event stream of actual presence changes suddenly stopped.

    We still get these validation requests on subscription renewal.
    I've confirmed that the subscriptions are created successfully. We run another app on our lab environment, and that also stopped at the same time.

    I suspect there might be something wrong with this service.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.