Signed URL on Sharepoint

Rogerio Acquadro 1 Reputation point
2021-06-14T11:48:26.923+00:00

I'm developing an application that uses Sharepoint to store some files. These files should be accessible from the users logged on this app (not necessarily they are part of Sharepoint user database).

Is there a way to send to this final user a signed URL of the stored file in a similar way AWS S3 does? On AWS I ask the API to generate a URL for a single file with an expiration timeout so it won't be accessible forever.

Thanks

Microsoft 365 and Office SharePoint Development
Microsoft 365 and Office SharePoint For business Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MichaelHan-MSFT 18,126 Reputation points
    2021-06-15T04:15:15.333+00:00

    Hi @Rogerio Acquadro ,

    On SharePoint, we could also use CSOM API to generated a URL for a single file with an expiration timeout.

    The method is Web.CreateAnonymousLinkWithExpiration: https://learn.microsoft.com/en-us/previous-versions/office/sharepoint-server/mt143090(v=office.15)


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


    If the response is helpful, please click "Accept Answer" and upvote it.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.