【问题标题】:Get other user's outlook tasks with Microsoft Graph API使用 Microsoft Graph API 获取其他用户的 Outlook 任务
【发布时间】:2020-08-19 14:25:34
【问题描述】:

我正在开发一个可以读写用户的 Outlook 任务的应用程序。我可以使用以下 API 读取分配给我的用户 ID 的任务。

https://graph.microsoft.com/beta/users/admin@mycompany.com/outlook/tasks

当我尝试通过提供 userPrincipalName 来读取其他用户的任务时,我收到 403 错误。

请求:https://graph.microsoft.com/beta/users/support@mycompany.com/outlook/tasks

{
"error": {
    "code": "ErrorAccessDenied",
    "message": "Access is denied. Check credentials and try again.",
    "innerError": {
        "request-id": "05fab540-3638-4b61-95ef-f2470539f385",
        "date": "2020-08-17T07:25:06"
    }
}
}

请告诉我是否可以读取其他用户的任务。

【问题讨论】:

    标签: java microsoft-graph-api


    【解决方案1】:

    要读取多个用户的任务,您需要使用应用程序权限而不是 Delegated https://docs.microsoft.com/en-us/graph/auth/auth-concepts#microsoft-graph-permissions

    这是为了阻止用户访问属于其他用户的数据。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-09-02
    • 1970-01-01
    • 2017-04-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多