我正在使用Graph Api来管理我们组织的Office 365组。
我能够查看和删除群组的线程而没有任何问题,但是当我尝试删除线程帖子内的个人附件时,我得到以下响应:
Code: ErrorAccessDenied
Message: Access is denied. Check credentials and try again., Cannot delete attachment.
Inner error
使用Graph Explorer会导致相同的错误:
{
"error": {
"code": "ErrorAccessDenied",
"message": "Access is denied. Check credentials and try again., Cannot delete attachment.",
"innerError": {
"request-id": "1aa1be11-0eb9-4fbe-93f5-09836b3b7c43",
"date": "2019-03-20T09:09:10"
}
}
}
应用程序和用户具有必需的Group.ReadWrite.All权限(由管理员同意,请在文章结尾查看来自图资源管理器和Azure门户的图像)。我正在使用以下电话
图形浏览器:
DELETE /groups/{id}/threads/{id}/posts/{id}/attachments/{id}
C#:
await client.Groups[group.Id].Threads[thread.Id].Posts[post.Id].Attachments[attachment.Id].Request().DeleteAsync()
根据文档
https://docs.microsoft.com/en-us/graph/api/attachment-delete?view=graph-rest-1.0
用户是论坛的所有者和成员。
但是,如果我尝试删除包含附件的线程,则不会遇到任何问题。
我想念什么吗?