Internal user is not able to access file in OneDrive using shared link even he has direct access

Baliwada Tharun Kumar 1 Reputation point
2022-06-29T11:57:58.46+00:00

Hello All,

I am uploading file (dashboard.pdf) to OneDrive using Microsoft Graph API and inviting recipients to that file using this Invite API. The recipients can be both internal and external users.

When I invited internal@Company portal .com and external@jaswant .com on drive item (dashboard.pdf), The response contains web URL which is a shared link.
216096-1.png

If the web URL is opened in a browser it requests email for the security check. I have provided external email and able to access the file after the security check.

But when I am providing the internal email, it is showing the error that the email is not associated.
216045-image.png

When I directly go to the file, I can see the internal email is added on the file in direct access and external email in shared access.

Internal email is able to access the file when the link is opened where the user is already logged in and by showing the warning as below:
216068-image.png

Please help me how internal and external users can sign in and access the files from single link.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,113 questions
{count} votes

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.