To share files with a third party using an app ID, you can use the Microsoft Graph API. The API allows you to create a sharing link that can be used to access the file. To create a sharing link, you need to make a POST request to the /shares endpoint with the driveItem resource. You will also need to provide the scope parameter with the value files.read to grant the third party read access to the file. Once the request is successful, you will receive a response containing the sharing link that can be used to access the file.
access one drive with azure graph api
hi,
i have registered an app and enabled files.read.
app ID works, atleast from authentication perspective. I have tested it.
this app (client-id and secret) i will be sharing with 3rd party (outside my ORG) so their code can come in and access files from OneDrive.
my companies oneDrive is a source.
now my question is, how to share file with 3rd party. Ideally i was thinking of adding "app-id/client-id/object-id" in OneDrive interface, but it is not possible. I cannot search that.
Also first option is disabled in my company. So I cannot create globally sharable link (see screenshot).
so i am not sure what 3rd party will write in their code to access files (predefine) from my OneDrive (business account) via code (python or postman).
Microsoft Security | Microsoft Graph
1 answer
Sort by: Most helpful
-
Diya Ahuja 5 Reputation points
2023-06-30T18:07:00.67+00:00