Microsoft Graph 订阅扩展错误 - 删除/更新

Sca*_*row 5 c# azure microsoft-graph-sdks microsoft-graph-webhooks microsoft-graph-api

问题

  • 我目前有一个 Azure Active Directory 应用程序,它有一个 Microsoft Graph Webhook 订阅,用于侦听指定邮箱中的新电子邮件(消息)。
  • 订阅有一个计划任务,通过更新请求更新订阅的到期日期。订阅的目标是使用其 MS Graph 提供的 ID。
  • 针对此特定订阅的任何 DELETE 或 UPDATE 请求都会失败。 (参见下文‘错误响应’。)

  • 我意识到这可能与此处提出的问题相同的问题/错误:https : //stackoverflow.com/a/53111286/7902641
  • 是否有任何修复/解决方案/或解决方法?
  • 如果已经修复或者这是一个完全不同的问题,我可以做些什么来解决这个特定问题?
  • 谢谢!

错误响应

{
  "error": {
    "code": "ExtensionError",
    "message": "Operation: Delete; Exception: [Status Code: NotFound; Reason: The subscription with Id 'Q0IzOUZCMTYtMTk4OC00OEZDLUFFQjQtNzI4NTU1MDREMkVDXzQ5RDk2MzI3LUFDRDEtNEE2QS05QTQ1LUYwQ0ZGQjgwNEQ0Qg==' is not found.]",
    "innerError": {
      "request-id": "e83fe463-....-....-....-76eb35e2e697",
      "date": "2019-03-22T02:35:14"
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

额外信息

  • Somehow the Microsoft Graph ID for the subscription is...transformed? The original subscription ID is ( 528b79f1-....-....-....-360c0e1149e9 ) and the returned target ID is: ( Q0IzOUZ ... NEQ0Qg== ) .
  • The executing UPDATE request originates from an ASP.NET CORE application, using the Microsoft Graph SDK (C#).
  • However I have eliminated the SDK as the origination of the problem -- using a REST API tester (Insomnia), I achieve the same error result. The request URL looks like:
  • I have also attempted to use the BETA version instead of v1.0. Unfortunately I get the same error result.

Configuration


== Update ==

  • The subscription in question has now expired and disappeared from my application's subscriptions list (timestamp, PST: 3/22/2019 8:45:22 AM).
  • I will no longer be able to test against it (sorry S.O. posterity!).
  • However, good news: now that the problem child (subscription) in question is gone, I was able to create a new subscription and restart my affected service. I am able to successfully submit get / update / delete requests against any newly created subscriptions.

Sca*_*row 0

==更新==

  • 有问题的订阅现已过期并从我的应用程序的订阅列表中消失(时间戳,太平洋标准时间:2019 年 3 月 22 日上午 8:45:22)。

  • 我将无法再对其进行测试(对不起后代!)。

  • 不过,好消息是:既然有问题的子项(订阅)已经消失,我就可以创建新的订阅并重新启动受影响的服务。我能够针对任何新创建的订阅成功提交获取/更新/删除请求。

由于这篇文章已经发布了将近一年,并且很可能是通过 MSFT 的修复解决的(我们的实现中没有可操作的修复),因此我将这篇文章标记为“已答复”。

@baywet感谢您提出这样做​​的建议。