Hi @Pablo Glomby ,
You could use Graph api to get file name from sharing link. You could refer to this article: https://learn.microsoft.com/en-us/graph/api/shares-get?view=graph-rest-1.0&tabs=csharp#code-try-2
First you need to ecode the sharing URL:
string sharingUrl = "https://onedrive.live.com/redir?resid=1231244193912!12&authKey=1201919!12921!1";
string base64Value = System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(sharingUrl));
string encodedUrl = "u!" + base64Value.TrimEnd('=').Replace('/','_').Replace('+','-');
With the encodedurl, you could use the endpoint to get the shared file:
GET /shares/{shareIdOrEncodedSharingUrl}
Below is my test:
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.