Question:
If an Azure Service Principal (SPN) has the Files.ReadWrite.All
Microsoft Graph API permission, does it gain access to all files within the tenant, or only to the files to which resource owners have explicitly granted access?
Context:
In our organization, we adhere to the principle of least privilege. The Files.ReadWrite.All
permission lacks a clear description of how access is granted. Does this permission merely allow access to the Graph API, with actual file access being controlled by the resource owner? Or does it grant access to all files within the tenant? The closest clarification found is in the Microsoft Graph permissions overview, which states: “Before the Microsoft identity platform can authorize your app to access data in the Microsoft cloud, the app must be granted the privileges that it needs. Similarly, before the Microsoft identity platform can authorize your app to access data through Microsoft Graph, the app must be granted the privileges that it needs.” However, this remains unclear for many of us.
Additionally, I intend to perform automation without a signed-in user by using application roles.
Objective:
To modify a file within a specific folder in SharePoint.
Questions:
- Does the
Files.ReadWrite.All
permission grant access to the resources themselves, or does it only provide the ability to access data via the Graph API, with actual access rights being granted by the resource owner?
- What set of permissions is required to modify a file within a specific folder in SharePoint using application roles?