【发布时间】:2020-01-05 21:11:32
【问题描述】:
我正在使用 Microsoft Graph 使用应用程序凭据创建日历事件,其中将使用组织者的电子邮件 ID:
https://graph.microsoft.com/v1.0/users/<organizer_email_id>/calendar/events
在创建活动之前,我发出PATCH来更新组织者的displayName、givenName和surname:
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-directory microsoft-graph-api microsoft-graph-calendar