Building custom solutions that extend, automate, and integrate Microsoft 365 apps.
As a fellow user like you, I can confirm the current behavior based on my testing.
With an app-only token using Files.ReadWrite.All + Sites.ReadWrite.All, the sharing-link permission is returned successfully, but the sensitive properties shareId and link.webUrl are omitted.
After adding Sites.FullControl.All, I repeated the same test against the same file and same sharing permission, and both shareId and link.webUrl were returned.
So, the behavior I observed is:
-
Files.ReadWrite.All+Sites.ReadWrite.All>linkis returned, butshareIdandlink.webUrlare omitted. - Adding
Sites.FullControl.All>shareIdandlink.webUrlare returned.
This appears to be consistent with what you are seeing.
However, I would not conclude that Sites.FullControl.All is officially required. The Microsoft Graph documentation for listing permissions says that sensitive properties such as shareId and webUrl are returned to callers that are able to create the sharing permission. The Create sharing link documentation lists Files.ReadWrite.All as the least-privileged application permission and Sites.ReadWrite.All as a higher-privileged permission. Therefore, based on the testing, this looks more like a difference between the documented permissions and the current service behavior for app-only access, rather than a documented requirement to use Sites.FullControl.All.
Since Sites.FullControl.All provides considerably broader access, I would avoid granting it in production solely to work around this behavior unless Microsoft confirms that it is currently required. As this is just a user-to-user support forum, I recommend raising the issue in the Microsoft Graph GitHub repository so that the product engineering team can investigate the behavior directly.
Reference: Participating in a discussion - GitHub Docs
Note: Please follow the steps in the forum documentation to enable e-mail notifications if you want to receive the related email notification for this thread.