microsoftgraph / msgraph-sdk-javascript

Microsoft Graph client library for JavaScript
https://graph.microsoft.com
MIT License
752 stars 226 forks source link

Setting permissions for downloads from OneDrive #1621

Open malee1975 opened 7 months ago

malee1975 commented 7 months ago

Is it possible when generating a share URL as part of the download operation to limit scope of access?

I am creating an access token on an application level and then requesting a download from OneDrive using NodeJS streams with .getStream(). As part of this process a share URL is generated, this URL is accessible to anonymous users for up to an hour.

I have been reading up on creating share links and setting permissions, with the idea of limiting access to the share URL to either specific users or to the organization generating the share URL.

Is this possible with the SDK? Are there query parameters or headers that can be added to the initial download request that would limit access to the share URL?