Programmatically upload documents to shared folders from an external account

%3CLINGO-SUB%20id%3D%22lingo-sub-2323019%22%20slang%3D%22en-US%22%3EProgrammatically%20upload%20documents%20to%20shared%20folders%20from%20an%20external%20account%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2323019%22%20slang%3D%22en-US%22%3E%3CP%20class%3D%22%22%3EI%20am%20having%20this%20use%20case%3A%3C%2FP%3E%3CP%3E-%20Account%20A%20in%20tenant-1%3C%2FP%3E%3CP%3E-%20Account%20B%20in%20tenant-2%3C%2FP%3E%3CP%3E-%20B%20shares%20a%20folder%20within%20a%20SharePoint%20site%20of%20tenant-2%20to%20A%2C%20with%20write%20permission.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EA%20then%20can%20see%20the%20shared%20folder%20within%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%3EShared%26nbsp%3B%3C%2FEM%3Etab%20of%20OneDrive%20for%20business.%20A%20can%20access%20the%20shared%20folder%20from%20that%20or%20from%20the%20link%20in%20A's%20Outlook%20inbox.%20By%20opening%20the%20link%2C%20A%20can%20then%20create%20folders%2C%20upload%20documents%2C...%20within%20that%20folder.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%20my%20question%20is%2C%20whether%20it%20is%20possible%20to%20do%20those%20actions%20(create%20folders%2C%20upload%20documents%2C..)%20inside%20that%20shared%20folder%20programmatically%2C%20e.g%20using%20SharePoint%20REST%20API%2C%20Microsoft%20Graph%20API%2C...%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20read%20through%20some%20documents%20related%20to%20SharePoint%20REST%20API%2C%20Microsoft%20Graph%20API%2C..%20and%20it%20seems%20like%20those%20API%20are%20used%20only%20for%20accessing%20SharePoint%20sites'%20documents%20within%20user's%20tenant%2C%20not%20from%20a%20remote%20tenant.%20Am%20I%20correct%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22%22%3EPlease%20let%20me%20know%20if%20you%20have%20any%20information%20about%20this%2C%20many%20thanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2323019%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

I am having this use case:

- Account A in tenant-1

- Account B in tenant-2

- B shares a folder within a SharePoint site of tenant-2 to A, with write permission.

 

A then can see the shared folder within Shared tab of OneDrive for business. A can access the shared folder from that or from the link in A's Outlook inbox. By opening the link, A can then create folders, upload documents,... within that folder.

 

Now my question is, whether it is possible to do those actions (create folders, upload documents,..) inside that shared folder programmatically, e.g using SharePoint REST API, Microsoft Graph API,...?

 

I read through some documents related to SharePoint REST API, Microsoft Graph API,.. and it seems like those API are used only for accessing SharePoint sites' documents within user's tenant, not from a remote tenant. Am I correct?

 

Please let me know if you have any information about this, many thanks!

0 Replies