使用Graph API创建订阅时,即使我们在访问令牌中具有足够的权限,也会收到以下错误。
令牌权限:Calendars.ReadWrite Contacts.ReadWrite Tasks.ReadWrite User.Read profile openid email
{
"error": {
"code": "ExtensionError",
"message": "Operation: Create; Exception: [Status Code: Forbidden; Reason: Access is denied to the requested resource. The user might not have enough permission.]",
"innerError": {
"date": "2022-11-30T08:23:03",
"request-id": "0541655d-83f3-456e-af47-165caf259c76",
"client-request-id": "0541655d-83f3-456e-af47-165caf259c76"
}
}
}
使用的详细信息:
请求URL:
POST https://graph.microsoft.com/v1.0/subscriptions
请求正文:
{
"notificationUrl":"<development-url>/notifications/office365/graph/v1",
"expirationDateTime":"2022-12-03T06:48:06Z",
"resource":"/me/todo/lists/{taskListId}/tasks",
"changeType":"created,updated,deleted",
"clientState":"<client-state>"
}
使用的API-https://graph.microsoft.com/v1.0/subscriptions(Microsoft documentation)
受问题影响的用户计数- 190
1条答案
按热度按时间rxztt3cl1#
根据创建todoTask订阅的文档,用户必须有Tasks.ReadWrite权限,应用程序权限不支持,请检查您有什么权限?
希望这对你有帮助
谢谢