Contents
How to get user details using Microsoft Graph API in SPFX?
Step 2: Create a new solution by running the Yeoman SharePoint Framework Generator command: Accept the default SPSFX Project as your solution name, and then select Enter. Select SharePoint Online only (latest), and then select Enter. Select Use the current folder as the location for the files.
How to access Microsoft Graph API from Azure function?
In a scenario where your application needs to perform some tasks which require more permissions then currently logged In user, you can use this approach to handle those scenarios. For example, You can configure Azure AD app with elevated Microsoft Graph API permissions and then call Microsoft Graph API from Azure Function.
How to consume the Microsoft Graph API using PNP?
Have to configure the Graph API access request, it totally based on the what data you want to access using Graph API. In the package-soltion.ts file which located under config folder. In this file you have to add webApiPermissionRequests property in the JSON.
How to access Microsoft Graph in SharePoint framework?
By default, the service principal has no explicit permissions granted to access Microsoft Graph. However, if you request an access token for Microsoft Graph, you get a token with the user_impersonation permission that you can use to read information about the users (User.Read.All).
We also saw the basic Hello World web part creation and how to retrieve and display list items using SharePoint Framework. In this section, we will see another example of SPFx and PnP in action, here we will be using this combo to retrieve the user profile properties and display them in the web part.
How to retrieve user profile properties using SPFX and PNP?
In this section, we will see another example of SPFx and PnP in action, here we will be using this combo to retrieve the user profile properties and display them in the web part. The major project files used in this solution have been zipped and uploaded along with this article.
https://www.youtube.com/watch?v=MNywB3Fr0sY