Can guests use MS Graph to pull documents from our SharePoint site ?

BetterSolutions.com 121 Reputation points
2022-01-11T09:34:33.663+00:00

Hi,

We have watched the video and followed all the steps outlined here:
https://learn.microsoft.com/en-us/microsoft-365/solutions/collaborate-in-site?view=o365-worldwide

External Collaboration Settings in External Identities
SharePoint organization-level sharing settings
Created an Extranet Site
SharePoint site-level sharing settings
Added members to the Microsoft 365 Group

We have created a Single Page App that is registered under Azure App Registrations.
This App is using OAuth 2.0 Authorization Code Flow with PKCE.

Everything is working for Internal Users

Is it possible for External Users to pull documents from our SharePoint site using our App with MS Graph ?
The guest is currently signing in as themselves.

https://graph.microsoft.com/v1.0/sites/TENANT.sharepoint.com,   
f87eaf53-fhgh-4123-ggkk-d60hg86f767e,   
244g4gyj-7a2c-4fcf-8242-4t4ttey8261b   
/drive/root:/Document1.docx   

163900-app-reg-apis.png

Any help or suggestions would be really appreciated
thanks James

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,826 questions
Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,842 questions
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 41,286 Reputation points
    2022-01-12T02:13:40.807+00:00

    Hi @BetterSolutions.com

    Of course, external users can also use your app with MS Graph to pull documents from your SharePoint site, before that make sure you have added external users as guests to your tenant for collaboration. Also, be sure to use the /tenant id endpoint instead of the /common endpoint when you get the token to ensure your external users are logged in as guests of the tenant.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


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.