A python flask application I wrote is using the office 365 library to interact with our company sharepoint (in the 365 cloud).
I setup the below app permissions but
https://xyz.sharepoint.com/sites/xxxyyyzzz/_api/Web/getFolderByServerRelativeUrl('sites%2Fxxxyyyzzz%2FFreigegebene%2520Dokumente%2FGeneral')/Folders"
returns a 401 - Unauthorized error.
<AppPermissionRequests AllowAppOnlyPolicy="true">
<AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="FullControl" />
<AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="FullControl"/>
<AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="FullControl"/>
<AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web/list" Right="FullControl"/>
<AppPermissionRequest Scope="http://sharepoint/content/xyz" Right="FullControl"/>
</AppPermissionRequests>
This resolved to the following permissions:
Other calls like uploading/downloading files are working but I cant get the list folder/ create folder/ to work. I also never found any other permissions or higher access levels in the documentation.
What am I missing?
The 401 - Unauthorized error was very irritating, actually it was a problem with creating folder trees. The authentication worked using the Office365 python library.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With