Changes required to be done to Blazor Webassembly app using PNP SDK Core via Azure app registration that is going to be hosted in sharepoint page?

rashmi sharan 1 Reputation point
2022-03-16T11:37:59.517+00:00

I have hosted the below WebAssembly app solution on SharePoint page.
https://pnp.github.io/pnpcore/demos/Demo.Blazor/README.html
I want to know what changes are required to this solution and azure app registration so that i can use the pnp core sdk(Microsoft Graph) to access the data from SharePoint directly after deployment.
Please find the error :183761-capture.jpg

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,427 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,894 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,911 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 32,246 Reputation points Microsoft Vendor
    2022-03-17T07:53:16.077+00:00

    Hi @rashmi sharan ,
    You can define applications in Azure AD and these applications can be granted permissions to SharePoint, but also to all the other services in Office 365. This model is the preferred model in case you’re using SharePoint Online.
    I have found a nice article that might help you
    https://medium.com/@hubfly/generate-graph-api-access-token-in-sharepoint-provided-hosted-app-2ff23f0eccf2


    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.


    0 comments No comments