-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Download file by Link #1054
Comments
… (any fully qualified link to a file, including sharing links) using the `GetFileByLink` methods on `IWeb` #1054
@No1e : I've just added extra method that allow you to get a file by either id or link. In your case the link option is what you need, just pass in a fully qualified link to the file (e.g. a sharing link) and you'll get back an This new functionality will be available with our next nightly release (version 1.8.36 or higher). I'll close this issue now, but don't hesitate to re-open if you can't get this to work. Thanks for using PnP Core SDK and providing feedback. |
@jansenbe Awesome! Thank you very much! |
@jansenbe I just tested new feature, it works. Thank you very much.
This works, but its not optimal setup from the security perspective. What's relative new is the SharePoint: Sites.Selected. Best regards, |
@No1e : PnP Core SDK requires both Graph and SharePoint permission scopes as it uses both APIs under the cover. If you only want to rely on Graph you can use the Graph SDKs. Sites.Selected is a model that allows an app (using sites.fullcontrol.all application permission or being ran as global admin) to grant another app access to one or more site collections using either read or write permissions. There's no UI for this, so you'll need to resort to APIs to configure this (see https://learn.microsoft.com/en-us/graph/api/resources/permission). The API docs however don't give you a good overview, Paolo's videos are good resources + there are also some good blog posts (https://www.google.com/search?q=sites.selected&oq=sites.selected&aqs=edge..69i57j0i512l7j69i64.2329j0j1&sourceid=chrome&ie=UTF-8). Here's an example of the API call to grant an app permissions to a given site collection: |
@jansenbe Thank you very much for the answer and provided links to related documentation and blogs, where I can learn more. Best regards, |
Category
Describe the feature
Download file from SharePoint by using Link created in SharePoint.
Describe the solution you'd like
I was not able to find API for this, so my apologies if there is already way to achieve this.
It would be great if there would be a possibility to download file by using Link created in SharePoint (selecting given file in SharePoint and Copy Link).
Additional context
The text was updated successfully, but these errors were encountered: