Hoe to share a document link for external user using one drive API

Pradyut Sinha 21 Reputation points

I am using Onedrive api for sharle a document link to extenal user in c# it is not working

A Microsoft file hosting and synchronization service.
175 questions
Microsoft Graph Files API
Microsoft Graph Files API
A Microsoft API to create an app that connects with files across OneDrive, OneDrive for Business, and SharePoint document libraries.
322 questions
A set of technologies in the .NET Framework for building web applications and XML web services.
1,322 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Srinivasa Rao Darna - MSFT 6,346 Reputation points Microsoft Vendor

    Hello @Pradyut Sinha ,

    Refer Documentation: Send a sharing invitation, can be used to send sharing link to an external user.

    POST /drives/{drive-id}/items/{item-id}/invite

    Hope this helps. If the answer is helpful, please click Accept Answer and kindly upvote it. If you have extra questions about this answer, please click Comment.