python-3.x - 共享点文件夹应用程序权限 - 未经授权

标签 python-3.x sharepoint permissions

我编写的一个 python flask 应用程序正在使用 office 365 库与我们公司的共享点(在 365 云中)进行交互。

我设置了以下应用权限但是 https://xyz.sharepoint.com/sites/xxxyyyzzz/_api/Web/getFolderByServerRelativeUrl('sites%2Fxxxyyyzzz%2FFreigegebene%2520Dokumente%2FGeneral')/Folders" 返回 401 - 未经授权的错误。

<AppPermissionRequests AllowAppOnlyPolicy="true">
  <AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="FullControl" />
  <AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="FullControl"/>
  <AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="FullControl"/>
      <AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web/list" Right="FullControl"/>
      <AppPermissionRequest Scope="http://sharepoint/content/xyz" Right="FullControl"/>
</AppPermissionRequests>

这解决了以下权限:

  • 让它完全控制此网站集。
  • 让它完全控制这个网站。
  • 让它完全控制列表:
    • 文件
  • 让它与其他用户共享权限。
  • 让它访问有关本网站用户的基本信息。

上传/下载文件等其他调用正在运行,但我无法让列表文件夹/创建文件夹/运行。 我也从未发现任何其他权限或更高的访问级别 in the documentation.

我错过了什么?

最佳答案

401 - Unauthorized 错误非常恼人,实际上这是创建文件夹树的问题。 身份验证使用 Office365 python 库进行。

关于python-3.x - 共享点文件夹应用程序权限 - 未经授权,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70568265/

相关文章:

sharepoint - 自定义 SharePoint 2010 移动登录屏幕

c# - 如何从 Microsoft.SharePoint.Client.File 对象获取文件大小?

c# - 为什么 WellKnownSidType 有时无法转换为 sid/account?

html - AWS S3 - 允许公众查看 HTML 文件

android - Cordova 向 AndroidManifest.xml 添加不必要的权限

python - 使用 .readlines() 并努力访问列表

python-3.x - 图像无法使用 Image.open(fnames) 打开,并且代码有 "' 列表'对象没有属性 'read'“错误

python - Pygame错误: self. spritedict [spr] = surface_blit(spr.image, spr.rect)

sharepoint - 使用 Microsoft Graph 列出 Microsoft Sharepoint 站点

python - 如何*不*创建实例