Microsoft Graph:如何通过Web应用程序从组织的用户获取数据? [英] Microsoft Graph: how to get Data from users of an organisation through web app?

查看:68
本文介绍了Microsoft Graph:如何通过Web应用程序从组织的用户获取数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个Web应用程序,该应用程序需要访问组织中某些用户的Outlook任务中的任务.据此,我知道此功能对于Microsoft Graph来说是相当新的:

I am building a web application that needs to access the tasks from Outlook tasks of some the users of my organisation. I know this functionality is fairly new to Microsoft Graph according to this:

https://developer.microsoft.com /en-us/graph/docs/concepts/changelog#outlook-tasks

使用Graph Explorer时,我可以通过此调用获取所有任务:

When I use Graph Explorer I can get all my tasks with this call:

https://graph.microsoft.com/beta/me/outlook/tasks

但是我的任务或当前用户的任务不是我所需要的.我需要访问组织中所有Outlook任务用户的任务列表,而不管应用程序中当前连接了谁.我知道我可以使用类似的方法从特定的用户那里获取任务:

But my tasks or the current user's tasks are not what I need. I need to have access to the tasks list of all the users of Outlook task in my organisation regardless of who is currently connected in the app. I know i can use something like this to get tasks from a spcific user:

GET /users/{id|userPrincipalName}/outlook/tasks

但是我总是收到以下回应:

But i always recevie the follwing response:

{ 错误": { "code":"ErrorAccessDenied", "message":访问被拒绝.请检查凭据,然后重试.", "innerError":{ "request-id":"5831bd5b-8fd1-4f77-b49b-c976ddffab3f", "date":"2017-07-18T15:42:49" } } }

{ "error": { "code": "ErrorAccessDenied", "message": "Access is denied. Check credentials and try again.", "innerError": { "request-id": "5831bd5b-8fd1-4f77-b49b-c976ddffab3f", "date": "2017-07-18T15:42:49" } } }

我已授予每个管理员的权限,但我仍然收到相同的响应.我是否跳过了重要步骤?如果是这样,这些步骤是什么?我可以在Graph Explorer中测试此功能还是必须在我的应用程序中对其进行测试?

I have grant every administrator's permissions but I still receive the same response. Did I skipped importants steps? If so, what are those steps? Can I test this functionality in Graph Explorer or I must test it in my app?

推荐答案

目前,您只能使用委派权限(即代表当前用户)访问Outlook任务.您可以使用Tasks.Read.Shared范围来访问其自身的任务,但是同样,这仅提供对与当前用户共享的Outlook任务的其他访问.

At the moment, you can only access Outlook Tasks using delegated permissions (i.e. on behalf of the current user). You can reach outside their own tasks using the Tasks.Read.Shared scope but again, this only provide additional access to Outlook Tasks that were shared with the current user.

这里要查找的是Tasks.Read.AllTasks.ReadWrite.All权限.这些将属于应用程序许可",并且需要管理许可".目前,此功能尚不可用,尽管我确定它正在考虑中.我当然会建议将此建议发布在用户语音中.

What you're looking for here would be Tasks.Read.All or Tasks.ReadWrite.All permissions. These would fall under Application Permissions and require Administrative Consent. At the moment this functionality isn't available, although I'm sure it is being considered. I would certainly recommend posting this suggestion in the User Voice.

这篇关于Microsoft Graph:如何通过Web应用程序从组织的用户获取数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆