Question

In short - the issue appears to be that I can access a folder or file's anonymous link - but only after it's been created. When I say created - I mean clicking the 'copy link' button as show in the screen. (Also works fine if a Flow creates it)

Creating Anonymous link

If that's been done, then using the REST API to get the anonymous link works fine:

Header

Request header

Body

Request response

Response

Request body

If I try and 'create' a link for a new file though;

Bad response

Bad response

So where are my permissions failing me? You may have noticed that I don't pass the X-RequestDigest. That's because it doesn't seem to do anything. Without it I can upload and do whatever I need - with it, I gain no new permissions.

The app that I'm using to authenticate against has what I think is full control over the SharePoint site. As seen in this page's example:

Xml example

Is there anything I'm missing? Why wouldn't I be able to create an anonymous link through the API but I can access it if someone else has already created it?

Thanks for your time.

Was it helpful?

Solution

I had the same issue.

Started working for me when I updated app permissions to

<AppPermissionRequests AllowAppOnlyPolicy="true"> <AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="FullControl" /> <AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="FullControl" /> <AppPermissionRequest Scope="http://sharepoint/social/tenant" Right="Read" /> <AppPermissionRequest Scope="http://sharepoint/content/tenant" Right="FullControl" /> </AppPermissionRequests>
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top