Privacy policy. This topic covers how to use Microsoft Graph Toolkit components in a SharePoint client-side web part. Getting started involves the following steps:. Follow the steps to Set up your SharePoint Framework development environment and then create a new web part.
To prevent multiple SharePoint Framework components from registering their own set of Microsoft Graph Toolkit components on the page, you should deploy the Microsoft Graph Toolkit SharePoint Framework package to your tenant and reference Microsoft Graph Toolkit components that you use in your solution from this package.
The Microsoft Graph Toolkit providers enable authentication and access to Microsoft Graph for the components. To learn more, see Using the providers. SharePoint web parts always exist in an authenticated context because the user has already had to sign in in order to get to the page that hosts your web part. Use this context to initialize the SharePoint provider. First, add the provider to your web part. Next, you need to initialize the provider with the authenticated context inside the onInit method of your web part.
Now, you can start adding components to your web part. For example, to add the Person component , your code will look like:. To call Microsoft Graph from your SharePoint Framework application, you need to request the needed permissions in your solution package and a Microsoft tenant administrator needs to approve the requested permissions.
In Solution Explorer , open the code file for the web part that you just created. For example, if the name of your web part is WebPart1 , open WebPart1. In the code file, add controls to the CreateChildControls method. For an example, see Walkthrough: Create a web part for SharePoint. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. In the following example, the Planning Documents library is filtered by a selection in the Project Information list.
The "Marketing" value in the Project Team column is selected, so only documents owned by the Marketing team are displayed in the Planning Documents library. On your page, add a List web part or a Library web part and select the list or library with the values you want to filter by.
Add another List web part or a Library web part and select the list or library that contains the information you want to filter. Select the list or library web part you want to filter, and select Edit web part on the left side of the web part. Under Dynamic filtering , slide the toggle to the On position. Select the column you want to filter in the field Column in [your list name] to filter.
Under List or Library containing filter value , select the list or library you added to your page in Step 1. Under Column containing the filter value , select the column that has the values you want to filter by.
Using the example image at the beginning of section, the Dynamic filtering options for the Planning Documents library would look like the following:. Connect web parts in SharePoint. SharePoint in Microsoft More Notes: Some functionality is introduced gradually to organizations that have opted in to the Targeted Release program.
The web parts in this article are not available for use on classic pages. Only secure web sites can be embedded. Need more help? Expand your skills. Get new features first. Was this information helpful? Yes No. Thank you! Any more feedback? The more you tell us the more we can help. Can you help us improve? Resolved my issue. Clear instructions. Easy to follow. No jargon. Pictures helped. Didn't match my screen. Incorrect instructions.
Too technical. Not enough information.
0コメント