首页 > 解决方案 > 图形 API(Http 状态:412 前提条件失败 - ErrorIrresolvableConflict)

问题描述

我正在使用 Microsoft Graph 使用应用程序凭据创建日历事件,其中将使用组织者的电子邮件 ID:

https://graph.microsoft.com/v1.0/users/<organizer_email_id>/calendar/events

Create Event之前,我发出一个PATCH更新组织者的displayName,givenNamesurname:

PATCH https://graph.microsoft.com/v1.0/users/{id}

我看到事件被创建,但它正在使用旧名称发送邮件并引发以下错误:

HTTP Status code : 412 Precondition Failed.

{
    "error": {
        "code": "ErrorIrresolvableConflict",
        "message": "The send or update operation could not be performed because the change key passed in the request does not match the current change key for the item.",
        "innerError": {
            "request-id": "a36e60a4-0a18-4574-9f7f-75f6c1cce8b4",
            "date": "2020-01-05T14:22:54"
        }
    }
}

看起来在提交patch请求之前事件已经到达。我不想在两次通话之间有任何延迟,但唯一的选择是在创建事件之前,发出get请求以确认名称已更改。是否有任何其他解决方法或 Microsoft 需要修复该错误(如果有)?

标签: azure-active-directorymicrosoft-graph-apimicrosoft-graph-calendar

解决方案


这似乎是 Exchange 的一个已知问题。

通常此类问题需要微软工程师确认。

我相信现在最有效的方法是联系支持团队并附上您的 request-id 以进行调查。


推荐阅读