User Profile
Juuce
Copper Contributor
Joined 4 years ago
User Widgets
Recent Discussions
Onedrive Sharepoint API App writing to directory
Issue:Cannot create a central storage container that allows both Azure registered App (as Daemon [Application permissions] and share with OneDrive users in organisation. Requirement:Create a central storage directory that is accessible for users within the Microsoft organistation and the MS App (Azure) using Application Permissions. Current Status: Azure App created using 'Application Permissions' (not delegated) , Admin consent granted to files and sites (tenantId, clientId, clientSecret) Can create an access token and reference endpoints (/drives) Can list /drives which retrieves some sharepoint resource or use /sites to access custom shared libraries. Issue described in this link: https://stackoverflow.com/questions/70344566/share-central-folder-in-onedrive-with-ms-azure-api-application?noredirect=1#comment124348803_70344566 Basically we need an Azure Registered App to be able to access a central storage location "that can be linked with OneDrive / OneDrive for business" and for the app to be able to write to that central location. Background and testing: Assumption: Use OneDrive and share a single directory. Create an App that has permissions to this directory "as an application" (i.e. not delegated). Result: not possible as App (as application permissions) cannot set permissions to a OneDrive directory because it's not a user but a daemon. Assumption: Use 'shared library'. Create a new shared library and share this across user OneDrive space. Allow App to access Results: end point '/sites/<ID>/root/children works and a list of files is visible. Writing to this directory is not possible... No documentation and endpoints to upload files to this directory or create new subdirectories. Assumption: Use 'default' shared library (communication site) as central storage and share across multiple users Results: Can see/access shared directory using /drives/<id>/root/children. Can use SDK to upload a file to directory using endpoint. ISSUE: Permissions not valid of 'App permissions' app to write to shared directory. Both (Files.All and Sites.All has been granted to the app)....? Please help. How can an App (Without delegated permissions) write to a shared directory that an entire organisation can access (Via OneDrive and via app as daemon) Cheers, David541Views0likes0Comments
Recent Blog Articles
No content to show