Hi @Mario González ,
According to my research and testing, If you want access the shared file, please use the following Graph API:
GET /shares/{shareIdOrUrl}/driveItem
And one of the following permissions is required to call this API:
The shareIdOrUrl parameter : please create a ShareLink for this this file , and then follow these steps to convert the ShareLink:
- First, use base64 encode the URL.
- Convert the base64 encoded result to unpadded base64url format by removing = characters from the end of the value, replacing / with _ and + with -.)
- Append u! to be beginning of the string.
Please refer to this document : Accessing shared DriveItems
Similar issue for reference: How to get the shared file with Microsoft Graph
My test result:
Hope it can help you. Thanks for your understanding.
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
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.