SharePoint Sites.Selected upload
Overview
A Box connected with the Graph Sites.Selected permission can deposit into a SharePoint library. The shares API refuses that permission even when the site was granted explicitly.
How it works
The library URL is resolved to a site, then a drive. Upload uses the site-scoped path. Tags and the hash are written from the drive list and the uploaded item id. Sharing links are rejected with a message asking for the library URL.
Key files
src/protocol/microsoftApi.ts— site and drive resolution, site-scoped uploadsrc/services/fileProtect/uploadHandlers/sharepoint.pipe.ts— pass site and drive through uploadsrc/utils/sharepointUrl.ts— parse library URL, match drive, encode item path
Technical decisions
Sites.Selected cannot call the shares API. Site + drive resolution keeps the same library URL UX for broad Graph permission and for Sites.Selected once that site is granted.