azure-active-directorymicrosoft-graph-apisharepoint-onlinesharepointframework

Sharepoint WebPart with Graph API


Is there a way to use Sharepoint Framework Client side Webpart to use on classic Sharepoint Page ? I want to use Graph API. and it looks like i can use that using SpFx (without Azure AD App) but wondering if SpFx webpart can be added on classic SharePoint page (Project Online).

Also, I do not want to create Azure AD App to acquire access token and then use Graph APIs.

It looks like I have only following options:

Option 1: Use SpFx to create Webpart to use Graph API without registering App to Azure Option 2: Use Azure AD App to access graph api access token and then use that token hit APIs

Is there anything else i can do ? 😁


Solution

  • SPFx web parts can be added to both classic and modern pages. See here: SPFx web parts can be added to both classic and modern pages.

    And by using SharePoint Framework, you don't need to explicitly create Azure Active Directory applications to manage your permissions for your solutions.istead, you can request the needed permissions in your solution package, and Microsoft 365 tenant administrator can then grant the requested permissions in general for all solutions or for this specific solution (isolated solution). Read this article for more: https://learn.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/using-microsoft-graph-apis