The process of building custom applications and tools that interact with Microsoft SharePoint, including SharePoint Online in Microsoft 365.
Currently, I do not see a documented Microsoft Graph API or SharePoint REST API endpoint that creates the same Request files link that SharePoint/OneDrive creates from the UI.
The Request files feature allows users to choose a folder where others can upload files through a link. Uploaders can only upload files; they cannot view, edit, delete, download existing files, or see who else uploaded files. This behavior is different from a normal sharing link.
Microsoft documents PowerShell/admin controls for enabling or disabling the feature, such as:
Set-SPOTenant -CoreRequestFilesLinkEnabled $True
Set-SPOSite -RequestFilesLinkEnabled $True
and related expiration settings, but these commands manage whether the feature is available. They do not create a file request link for a specific folder.
Microsoft Graph does support creating sharing links for DriveItems through the createLink action, for example:
POST https://graph.microsoft.com/v1.0/drives/{driveId}/items/{itemId}/createLink
However, the documented link types are view, edit, and embed, and the documented scopes include anonymous, organization, and users. There is no documented requestFiles, uploadOnly, or equivalent link type in the Microsoft Graph v1.0 createLink API.
So, while you can programmatically create a folder and create normal sharing links, that is not the same as the SharePoint “Request files” upload-only link. A normal anonymous edit link may allow broader write access and does not represent the same restricted upload-only behavior described for Request files.
At this time, the supported approach is:
- Enable Request files at the tenant/site level using SharePoint Online Management Shell.
- Create the actual Request files link from the SharePoint or OneDrive UI.
- If full programmatic creation is required, consider submitting feedback to Microsoft Graph/SharePoint because there does not appear to be a documented supported API for generating that specific request link today.
Please refer: Enable file requests in SharePoint or OneDrive
If the answer is helpful, please click "Yes" and kindly upvote it. If you have extra questions about this answer, please click ""Comment"".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.