Controlling an application's API access to a SharePoint site

非 Y 不嫁゛ 提交于 2020-01-16 14:35:49

问题


I have an external program that I have scheduled to run once a day (i.e. no user interaction). This program should upload a file to a SharePoint Online site, using Microsoft Graph API. I'm able to enable this in Azure Active Directory by registering an app, and giving this app the application permission File.ReadWrite.All, then sending a PUT request to https://graph.microsoft.com/v1.0/drives/{drive-id}/items/{parent-id}:/{filename}:/content

However, by granting File.ReadWrite.All, the program will have access to all files in all site collections for my organization. I want to limit access to a specific site, or perhaps just a specific folder within that site. How can this be achieved? (without the need for a user to interactively sign in when the program is run)


回答1:


It is not currently possible to restrict app-only access to a specific SharePoint site, through Microsoft Graph.



来源:https://stackoverflow.com/questions/56073788/controlling-an-applications-api-access-to-a-sharepoint-site

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!