使用图形访问所有用户一个驱动器文件 [英] Accessing all users one drive files using graph

查看:90
本文介绍了使用图形访问所有用户一个驱动器文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能我正在发布重复的问题,如下面的帖子中所述.

Possibly I am posting the duplicate question as already described in the post below.

如何获得管理员对文件的访问权限适用于所有用户的OneDrive

我们遇到了同样的问题.无法使用以下api访问任何用户一个驱动器:

We are running in to same issue. Can not access any users one drive with following api:

https://graph.microsoft.com/v1.0/users/ {userPrincipalName}/drive/root/children

https://graph.microsoft.com/v1.0/users/{userPrincipalName}/drive/root/children

我们拥有所有权限,用于身份验证的帐户是Global Administrator.

we have all the permissions in place and account used for authentication is Global Administrator.

有趣的是,如下文所述,当我们从每个用户的管理门户提供对每个驱动器的访问权限时,上述api在一组相同的权限下就可以很好地工作.

Interestingly,as described in the article below, when we provide access from the Admin Portal on each users one drive, above api works well with the same set of permissions.

https://sharepointmaven.com/how-to-访问某人-elses-一个驱动器帐户/

当我们尝试下面的api时,州代码为200,但没有数据. https://graph.microsoft.com/v1.0/users/ { useremail}/驱动器

When we try the api below, States code is 200 but no data. https://graph.microsoft.com/v1.0/users/{useremail}/drives

感谢您的帮助.

推荐答案

我能够解决此问题. 毫无疑问,这是一个许可问题.我已经尝试了以下博客中所述的示例:

I was able to solve this. As doubt, it was a permission issue. I had tried the sample as described in the blog below:

https://azure. microsoft.com/en-us/resources/samples/active-directory-dotnet-daemon-v2/

在Azure AD中配置应用程序权限(应用程序注册(预览)),如下所示:

Configured the app permission in Azure AD (App Registration(Preview)) as shown below:

它开始工作. 另外,我应该提到,这在Graph Explorer中从未起作用.

It started working. Also, I should mention that this never worked in Graph Explorer.

希望这会有所帮助.

这篇关于使用图形访问所有用户一个驱动器文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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