1

Is it possible to access a folder, which I made publicly accessible via link, from the SharePoint REST API (without beeing authenticated)?

Currently when I try to access: https://<tenant>.sharepoint.com/sites/<site>/_api/web/GetFolderByServerRelativeUrl('Freigegebene%20Dokumente')/Folders I get a UnauthorizedAccessException

However when I navigate to the shared link once (without beeing authenticated). It seems like some cookies get set and then the REST request works as well!

How can I assure the REST request works, without the need to first access the shared link?

1 Answer 1

0

It seems like it is not possible to access public folders/files via the REST API.

To access the files and folders I solved this by registering an application with the Microsoft Identity platform and using the Microsoft Graph API to access the files and folders in the SharePoint site.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.