azure-active-directory - 图形 API(Http 状态:412 前提条件失败 - ErrorIrresolvableConflict)
问题描述
我正在使用 Microsoft Graph 使用应用程序凭据创建日历事件,其中将使用组织者的电子邮件 ID:
https://graph.microsoft.com/v1.0/users/<organizer_email_id>/calendar/events
在Create Event之前,我发出一个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 需要修复该错误(如果有)?
解决方案
推荐阅读
- algorithm - 生成满足条件的表格(比赛队伍分配)
- flask - 从浏览器调用时未创建芹菜任务,但仅在直接从 python 调用时创建
- model - 火炬服务预测模型调用问题
- browser - 浏览器如何处理二进制数据?
- hive - Oozie 调度器的编辑时间
- android - 使用 Flow 中断后重试网络调用
- sql - 合并列数不相等的表而不返回重复行
- ansible - Consecutif 命令 Ansible Playbook
- database - Sqlite3 恢复遇到内存不足错误
- php - XAMPP、友好的 URL 和 htaccess - 在实际站点上工作,无法在本地工作