Hi Mihir Hundiwala,
Thanks for reaching out to Microsoft!
Yes, it is possible for a program to read the contents of a shared OneDrive folder using the Microsoft Graph API. You will need to ensure that the program has the necessary permissions to access the folder.
The permissions required depend on whether you are using delegated or application-level permissions:
- Delegated Permissions: These are used when your app is acting on behalf of a user. You will need permissions like
Files.Read
,Files.ReadWrite
, orFiles.Read.All
- Application Permissions: These are used when your app is running as a background service or daemon. Permissions like
Files.Read.All
orFiles.ReadWrite.All
are required. However, these permissions grant access to all files in all site collections, which might be broader than what you need
You will need the inputs from user like Email, Folder Name and sharing URL.
Even after verifying the above, if the issue still persists, I recommend you raise a support case with Microsoft Graph, a Support Engineer will be able to look into this issue and assist you better. You can raise support ticket from New support request - Microsoft Entra admin center or https://admin.microsoft.com/#/support/requests.
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.