Wednesday, 27 December 2017

Working with SharePoint Site Permissions using PnP JavaScript Core Library

Views
Here let us look at the working with SharePoint site permissions using the PnP JavaScript library. Some of the basic operations like retrieve available permissions, add or remove the user permissions from the site will be explained.

Note: 
  • PnP JavaScript Core Library is supported on SharePoint 2013, SharePoint 2016 and SharePoint Online versions.
  • The prerequisites for the operations are es6-promise.jsfetch.js, pnp.js or pnp.min.js.

The following sample shows us retrieving all user permissions of the SharePoint site along with the user roles using PnP JavaScript Core library.



Friday, 8 December 2017

Azure Active Directory App Authentications

Views
Azure AD App registrations provides ways for authenticating or authorizing the user custom applications which uses Azure AD, to access the data available on the Microsoft products/services.

Why Azure AD App Registration? You might have already worked with custom applications that uses Azure Control Service, which provides way for authenticating users to gain access to web applications and services. As ACS is getting deprecated, Microsoft provides ways for authenticating the applications and provides way for enabling permissions for users to access the data. 

(Source: https://cloudblogs.microsoft.com/enterprisemobility/2013/06/22/azure-active-directory-is-the-future-of-acs/)

Monday, 20 November 2017

Working with Calendar events from Office 365

Views
In this article post, let us look at the way of accessing the Office 365 calendar events programmatically using REST APIs.

In the samples shown, calendar events will be accessed from SharePoint portal pages using two ways. One way is to use the graph API and the other way is using the outlook API.


Outlook API vs Microsoft Graph API:


Outlook API has lot of API end points to access the mailbox data in office 365 or other Microsoft mailbox services. It has around 11 API subsets for accessing various components under outlook like calendar, contacts, etc.

Microsoft Graph API, helps getting connected to multiple Microsoft products or services. The services include outlook, teams, SharePoint, people etc. This also helps in accessing other user information as well.

Tuesday, 14 November 2017

Using Webhooks for Posting SharePoint Items into MS Teams with Flows

Views
In my previous post, you would have seen posting the items into Microsoft Teams Channels as conversations using Microsoft Flows. The respective channels will be chosen by selecting the Teams service in the flow configurations.

In this post, let us try to achieve similar kind of functionality, but with a little different approach. As we are all aware that Microsoft Teams will support incoming webhook requests, let us try configuring the webhook URLs.


Webhook:


What is webhook? The external system which posts messages whenever data is available using the endpoint APIs.


How the webhook will help in Microsoft Teams? Take for an example, you are using Teams as a collaboration platform. You need to post data from multiple systems to the team channels for better collaboration. The webhook URL can be generated for a channel and can be shared with other external systems. Whenever the external system has the data for posting, the data will be sent to the teams using the API generated.


Saturday, 4 November 2017

Working with Microsoft Teams from SharePoint Using Graph API

Views
Let us see how to work with Microsoft teams from SharePoint programmatically using Graph APIs.

Microsoft has provided the Graph APIs to work with Microsoft Teams and its channels. Though, it is in a beta version. The graph APIs can be triggered from any of the portals. Here, let us only look at triggering the graph APIs from the SharePoint portals.

For example, the following graph API is used to get all the teams which you are part of.
  • https://graph.microsoft.com/beta/me/joinedTeams


Application with Microsoft Teams Permissions 


First, you need to register the application in Microsoft dev portal, where you need to provide the necessary permissions for accessing the Microsoft Teams data from any portal.
  • Login to the Microsoft applications portal https://apps.dev.microsoft.com
  • Provide the name
  • Copy the Application ID generated. (It will be used as client ID in the SharePoint code in the below section)
  • Add the platform as web and then provide the redirect URL. In our sample, you need to provide the SharePoint page URL you will be using to test the functionality.
  • In the Microsoft Graph Permissions, add User.ReadWrite.All and Group.ReadWrite.All permissions to the both the permissions (delegated and applications permissions).
  • Then save and close the application.


Navigate to the SharePoint page, where you want to test the functionality. Add a content editor web part with jquery script reference.


Acquire Access Token​​ and Hit Microsoft Teams Graph API


Access Token to be acquired for getting the Microsoft Teams data. The request token will be generated by redirect URL. The redirect URL to be built with the help of authentication server URL, domain details, response type, client ID (generated above), resource URL (Graph API URL) and redirect URI (SharePoint Page where the functionality is tested). In the following script file, required logic to get the access token is written.

Once the page is redirected, the access token will be available in the redirected URL. We need to extract the token and the ajax call is made to the graph API using the access token.

Create a custom JavaScript file (teams.js) with the script content available in the below section.



Test


Test the functionality by hitting the SharePoint page URL. The snapshot shows the Microsoft Teams.


Saturday, 28 October 2017

Post SharePoint Items into MS Teams using MS Flows

Views

Posting SharePoint Items as Conversations in Microsoft Teams


Here let us see how to push the items from SharePoint into the Microsoft Teams Channels as conversations using Microsoft Flows. #MicrosoftTeams #MicrosoftFlow

This is simple, straight forward and out of the box approach. Microsoft Flow eases our job with out of the box configuration.

Consider a business scenario, whenever an item is created in the SharePoint repository, it has to be pushed into Microsoft Team’s channel for discussions. The following steps will helps you in configuring the flow out of the box.

Note: Assuming, the connections for teams and SharePoint services are being available in the Microsoft Flow portal. If not already created, you will be prompted to provide the account details when configuring the SharePoint or the Microsoft Teams components in the below steps. You can provide different or the same account details. The accounts to the SharePoint or Microsoft teams can also be configured on the Microsoft Flows portal by navigating to the connections component.

Steps Involved:

  • Create a list in the SharePoint site.
  • Create a channel in the Microsoft teams.
  • Login to the Microsoft flows.
    • Select the SharePoint service à "when an item is created" template.
    • Provide the site details and list details.
    • Click on New Step à Add an action option.
    • Search for Microsoft teams and select it.
    • Select Post Message option.
    • From the drop down select the Microsoft Teams ID, Channel ID, and Message to be posted.
    • Here, message to be posted can be customized. Click on the message text box and select the SharePoint item field by adding dynamic content. (picture shown below)
  • Save the flow.


Test the Flow:

  • Login to the SharePoint site and navigate to the list.
  • Create an Item à Provide some data and save it.
  • Login to the Microsoft Teams and navigate to the channel provided in the configuration.
  • You can see the item created in the SharePoint list, posted as a conversation in the Team’s channel.





Thursday, 26 October 2017

Removing Web Part from SPFx Solution

Views
You would have seen adding web parts to the SharePoint framework solutions. Here, let us see how to remove the web part from the SharePoint framework solution manually.

Web Part Files:

  • Navigate to your SPFx solution and the web parts folder inside it. (\src\webparts\)
  • Locate your web part folder and delete it. (This will delete all the files created for your web part)

Configuration File Entries:

  • Next, web part bundle needs to be removed from the config file (config.json).
  • In the config.json, locate your web part entry and remove the same. 
  • Similarly remove the localization file entry from the config file. 
For example, helloworld web part entry will look like,



Library Files:

  • Corresponding files should also be removed from the library folder.
  • Navigate to /lib/webparts/ folder in the solution. Locate your web part and delete the same.



Wednesday, 18 October 2017

Working With SharePoint Site Collections On Office365 Tenant Site Using PnP PowerShell

Views
In this article, you will learn how we can create, retrieve, update and delete SharePoint site collections on Office 365 tenant, using PnP PowerShell. The Client Side Object Model is used internally for these operations.

Prerequisite:

You need to have PowerShell 3.0, available on a Windows machine. You need to install or import PnP PowerShell packages. You can download the installers or view more documentation on the official site. The installers are available here. Online version installer is preferred. You can also install all the three installers for testing (SharePoint 2013, 2016, online).

The PnP PowerShell is supported from SharePoint 2013 On Premise and Office 365 versions. The following operations are compatible/tested on Office 365 environments/sites. These operations are not supported by On Premise versions.

Connect To Tenant Site:

To create, retrieve or modify the site collections, we need to connect to the SharePoint tenant (admin) site on Office 365, using the snippet given below. PnP PowerShell code, given below, helps in getting the current context of the admin site, using the Client Side Object Model (CSOM):
  1. $siteurl = "https://abc-admin.sharepoint.com"  # Tenant Admin URL  
  2. Connect-SPOnline -Url $siteurl    
  3. $ctx = Get-SPOContext  
Once connected, you can carry out any of the operations mentioned below, based on the requirement.

The site collections can be accessed from the site collections page (The URL will look like https://abc-admin.sharepoint.com/_layouts/15/online/SiteCollections.aspx). 

Retrieve Site Collections:

From the admin site, the available site collections can be retrieved, using PnP CSOM PowerShell.
Get-SPOTenantSite command is used to retrieve the site collections from the O365 SharePoint tenant site. The optional parameters used to retrieve the site collections are 
  • Detailed: Used to explicitly pull out information like the title. If not passed, the properties like the title value will be null.
  • IncludeOneDriveSites: Includes one drive sites in the result.
  • Force: Used to get the site collection results without any prompts. 
The following code snippet helps to retrieve all the site collections from the O365 SharePoint tenant site:
  1. $sites = Get-SPOTenantSite -Detailed -IncludeOneDriveSites -Force  
  2. Write-Host "There are " $sites.count " site collections present"  
  3. foreach($site in $sites){  
  4.     Write-Host "Title       : " $site.Title  
  5.     Write-Host "URL         : " $site.Url  
  6.     Write-Host "Template    : " $site.Template  
  7.     Write-Host "Status      : " $site.Status  
  8.     Write-Host "Storage (MB): " $site.StorageMaximumLevel  
  9.     Write-Host "Used (MB)   : " $site.StorageUsage  
  10.     Write-Host "Resources   : " $site.UserCodeMaximumLevel  
  11.     Write-Host "Owner       : " $site.Owner          
  12.     Write-Host "Sharing     : " $site.SharingCapability  
  13.     Write-Host "subsites    : " $site.WebsCount  
  14.     Write-Host "-----------------------------------------"    
  15. }  
The URL parameter is additionally used to get the information about the particular site collection. In the URL parameter, the site collection URL is passed to get the required information.
  1. $site = Get-SPOTenantSite -Url "https://abc.sharepoint.com/" -Detailed  
  2. Write-Host "Title       : " $site.Title  
  3. Write-Host "URL         : " $site.Url  
  4. Write-Host "Template    : " $site.Template  
  5. Write-Host "Status      : " $site.Status  
  6. Write-Host "Storage (MB): " $site.StorageMaximumLevel  
  7. Write-Host "Used (MB)   : " $site.StorageUsage  
  8. Write-Host "RESOURCES   : " $site.UserCodeMaximumLevel  
  9. Write-Host "Owner       : " $site.Owner          
  10. Write-Host "Sharing     : " $site.SharingCapability  
  11. Write-Host "subsites    : " $site.WebsCount  
  12. Write-Host "-----------------------------------------"  

Create Site Collection:

New-SPOTenantSite command is used to create the site collections on O365 SharePoint tenant.
The necessary parameters to create the site collections are:
  • Title
  • URL - New site collection full URL
  • Description
  • Template – site template Id
  • Resource quota – Number of the resources
  • Storage quota – Storage limit
  • Owner – Owner user Id
  • Time zone – Time zone number, which can be retrieved, using Get-SPOTimeZoneId command. 
The following code snippet helps to create a new site collection with the necessary parameters. The new site collection URL is passed.
  1. New-SPOTenantSite -Title "Test" -Url "https://abc.sharepoint.com/sites/Test" -Description "TestDesc" -Template "STS#0" -ResourceQuota 2 -StorageQuota 30 -Owner "abc@abc.onmicrosoft.com" -TimeZone 13  

Update Site Collection:

Set-SPOTenantSite is used to update the site collections present in the tenant site. The required parameter for the update is the site collection URL. The parameters like title, sharing and storage values can be updated.
The following code snippet helps to update the existing site collection with the necessary parameters. The existing site collection URL is passed.
  1. Set-SPOTenantSite -Url "https://abc.sharepoint.com/sites/Test" -Title "TestUpdated" -Sharing ExistingExternalUserSharingOnly  

Delete Site Collection:

Remove-SPOTenantSite command is used to delete a site collection. The required parameter for the delete operation is the existing site collection URL.
The following code snippet helps to remove a site collection from the O365 tenant. The site will be moved to the recycle bin.
  1. Remove-SPOTenantSite -Url "https://abc.sharepoint.com/sites/Test"  
The following code snippet helps to remove the site collection from the O365 tenant permanently.
  1. Remove-SPOTenantSite -Url "https://abc.sharepoint.com/sites/Test" -SkipRecycleBin -Force  

Summary:

Thus, you have learned how to create, retrieve, update or delete the site collections on Office 365 tenant/admin sites, using PnP PowerShell.

Create, Retrieve Or Delete Site Content Type On SharePoint Using PnP PowerShell

Views
In this post, you will learn, how we can create, retrieve and delete the site content types on SharePoint sites, using PnP PowerShell. The Client Side Object Model is used internally for these operations. The update operation is not available for the content types.

Prerequisite:

You need to have PowerShell 3.0, available on a Windows machine. You need to install or import PnP PowerShell packages. You can download the installers or view more documentation on the official site. The installers are available here.

The following operations will be compatible with SharePoint 2013 on-premise or Office 365 versions. 

Connect To Site:

Connect to the site, using the snippet, given below. The PnP PowerShell code, given below, helps in getting the current context of the site, using the Client Side Object Model (CSOM).
  1. #Get Current Context Site (Root)  
  2. $siteurl = "https://abc.sharepoint.com"  
  3. Connect-SPOnline -Url $siteurl  
  4. $ctx = Get-SPOContext  
Once connected, you can carry out any of the operations mentioned below, based on the requirement.

Create Site Content Type:

The content types can be added to the site collections by setting the context, using the site URL. PnP CSOM PowerShell can be used to complete the operation.

Add-SPOContentType command is used to create the site content types on SharePoint sites. The required parameters to create the new site content type are name, description and group. The new values can be passed as the parameters. In my example, I have created new site content called "PnPContentType". The default parent content type will be the item.

The following command snippet helps to create the new content type.
  1. function AddContentType(){  
  2.     Add-SPOContentType -Name "PnPContentType" -Description "PnP Content Type" -Group "PnPContentTypeGroup"  
  3. }  
  4. AddContentType # Create New Content Type with name, description  
The parent content type can be used as a base content type to create the new content types. The following example shows to create the  new content type, using the page content type, given below:
  1. function AddContentTypeUsingCT(){  
  2.     $pageCT = Get-SPOContentType -Identity Page  
  3.     Add-SPOContentType -Name "PnPPageContentType" -Description "PnP Content Type" -Group "PnPContentTypeGroup" -ParentContentType $pageCT  
  4. }  
  5. AddContentTypeUsingCT # Create New Content Type with name, description using page content type  
The following snapshot shows the new content types added to the site.


Retrieve Site Content Type:

The content types available on the site can be retrieved by setting the content with the URL, using PnP PowerShell. The following snapshot shows retrieval of all the content types from the site:
  1. function RetrieveContentTypes(){  
  2.     Get-SPOContentType        
  3. }  
  4. RetrieveContentTypes # Retrieves all the content types from site level  
The content type can be retrieved, using the content type Id.
  1. function RetrieveContentTypeByName(){  
  2.     Get-SPOContentType -Identity "Item"  
  3. }  
  4. RetrieveContentTypeByName # Retrieves the content type from site using name  
The following snapshot shows the content type retrieval, using PnP command:


The content type can be retrieved using, the content type name.
  1. function RetrieveContentTypeById(){  
  2.     Get-SPOContentType -Identity 0x01  
  3. }  
  4. RetrieveContentTypeById # Retrieves the content type from site using id  
The site content types from the particular list can be retrieved, using the list name.
  1. function RetrieveSiteCTfromList(){  
  2.     Get-SPOContentType -List "PnPList"  
  3. }  
  4. RetrieveSiteCTfromList # Retrieves the site content type from particular list  

Delete Site Content Type:

The site content type can be deleted from SharePoint site, using PnP PowerShell. Remove-SPOContentType is used to delete the content types. The content type name is passed for deleting the content type. The name or ID can be passed with the command, using the identity parameter.
  1. function RemoveContentType(){  
  2.     Remove-SPOContentType -Identity "PnPContentType" –Force  
  3. }  
  4. RemoveContentType # Delete the content type from site using name  

Thursday, 12 January 2017

Working With Cascading Dropdowns In SPFx Webpart Propeties

Views
In this post, you will learn how to populate cascading drop down options in SharePoint Framework web part properties pane.
You will see how to populate cascading dropdown fields with dynamic SharePoint list content. I have used two dropdowns in this sample.

Declare Drop down Fields/Properties 


The drop down values appended to the field is of type IPropertyPaneDropdownOption. The variables "listDropDownOptions" and "itemDropDownOptions" of same type are declared inside the class.
The below snippet shows the property declaration.
  1. private listDropDownOptions: IPropertyPaneDropdownOption[] =[];  
  2. private itemDropDownOptions: IPropertyPaneDropdownOption[] = [];   

Define Properties 


The properties are defined using propertyPaneSettings() method. The below snippet shows the properties defined.
  1. protected get propertyPaneSettings(): IPropertyPaneSettings {  
  2.   
  3.   return {  
  4.     pages: [  
  5.       {  
  6.         header: {  
  7.           description: strings.PropertyPaneDescription,  
  8.         },  
  9.         groups: [  
  10.           {  
  11.             groupName:"Lists",  
  12.             groupFields:[  
  13.               PropertyPaneDropdown('listDropDown',{  
  14.                 label: "Select List To Display on the page",  
  15.                 options:this.listDropDownOptions,  
  16.                 isDisabled: false  
  17.               }),  
  18.               PropertyPaneDropdown('ItemsDropDown',{  
  19.                 label: "Select Item to display",  
  20.                 options: this.itemDropDownOptions,  
  21.                 isDisabled: false  
  22.   
  23.               })  
  24.             ]  
  25.           }  
  26.         ]  
  27.       }  
  28.     ]  
  29.   };  
  30. }  
Note - There are two properties defined. One dropdown is for list source and the other dropdown is for listing down the items of the list. As you can see, the values are not appended directly, rather variable of type IPropertyPaneDropdownOption is assigned. 

Load First Dropdown (List Dropdown) 


Initially, on the property pane load, all the lists available in the SharePoint site should be listed in the list dropdown. Next, we need to load the list names on the dropdown field dynamically.
To load the values, onPropertyPaneConfigurationStart method is used. It loads only when the property pane is opened. So, this method will be used in the current sample.
The below snippet shows the methods to load the list names into list dropdown. The custom function is written to load the SharePoint list names into the dropdown property. Here, this.listDropDownOptions property is loaded with the list names, which will reflect in the list dropdown property.
  1. protected onPropertyPaneConfigurationStart(): void {  
  2.   // loads list name into list dropdown  
  3.   this.GetLists();  
  4.   
  5. }  
  6.   
  7. private GetLists():void{  
  8.   // REST API to pull the list names  
  9.   let listresturl: string = this.context.pageContext.web.absoluteUrl + "/_api/web/lists?$select=Id,Title";  
  10.   
  11.   this.LoadLists(listresturl).then((response)=>{  
  12.     // Render the data in the web part  
  13.     this.LoadDropDownValues(response.value);  
  14.   });  
  15. }  
  16.   
  17. private LoadLists(listresturl:string): Promise<spLists>{  
  18.   // Call to site to get the list names  
  19.   return this.context.httpClient.get(listresturl).then((response: Response)=>{  
  20.     return response.json();  
  21.   });  
  22. }  
  23.   
  24. private LoadDropDownValues(lists: spList[]): void{  
  25.   lists.forEach((list:spList)=>{  
  26.     // Loads the drop down values  
  27.     this.listDropDownOptions.push({key:list.Title,text:list.Title});  
  28.   });  
  29. }   


Load Second Dropdown (Items Dropdown)  


Then, once the list name is selected, the items dropdown property should be populated. This can be done by overriding onPropertyChange method. The method takes two parameters (property path and new value). The function should be executed only when the list dropdown property is changed.
The below snippet shows the methods to load the items (item Title field) into list dropdown. The custom function is written to load the SharePoint item titles into the items dropdown property. Here, this.itemsDropDownOptions property is loaded with the item titles, which will reflect in the item dropdown property.
  1. protected onPropertyChange(propertyPath: string, newValue: any):void{  
  2.   if(propertyPath === "listDropDown"){  
  3.     // Change only when drop down changes  
  4.     super.onPropertyChange(propertyPath,newValue);  
  5.     // Clears the existing data  
  6.     this.properties.ItemsDropDown = undefined;  
  7.     this.onPropertyChange('ItemsDropDown'this.properties.ItemsDropDown);  
  8.     // Get/Load new items data  
  9.     this.GetItems();  
  10.   }  
  11.   else {  
  12.     // Render the property field  
  13.     super.onPropertyChange(propertyPath, newValue);  
  14.   }  
  15. }  
  16.   
  17. private GetItems(): void{  
  18.   // Retrives Items from SP List  
  19.   if(this.properties.listDropDown != undefined){  
  20.     let url: string = this.context.pageContext.web.absoluteUrl + "/_api/web/lists/getbytitle('"+this.properties.listDropDown+"')/items?$select=ID,Title,Created,Author/Title&$expand=Author";  
  21.   
  22.     this.GetItemsDropDown(url).then((response)=>{  
  23.       // Loads in to drop down field  
  24.       this.LoadItemsDropDown(response.value);  
  25.     });  
  26.   }  
  27. }  
  28.   
  29. private GetItemsDropDown(listresturl:string): Promise<spListItems>{  
  30.   // Call to list to get the items  
  31.   return this.context.httpClient.get(listresturl).then((response: Response)=>{  
  32.     return response.json();  
  33.   });  
  34. }  
  35.   
  36. private LoadItemsDropDown(listitems: spListItem[]): void{  
  37.   // Populates drop down values  
  38.   this.itemDropDownOptions = [];  
  39.   if(listitems != undefined){  
  40.     listitems.forEach((listItem:spListItem)=>{  
  41.       this.itemDropDownOptions.push({key:listItem.ID,text:listItem.Title});  
  42.     });  
  43.   }  
  44. }   


Render Web Part  


The data displayed on the web part is rendered using render method. The web part should be rendered based on the values selected from two drop downs. The custom functions are written inside render() method to display the list items based on the list name and items selected from the drop downs.
The below snippet shows the functions to render the data on the web part.
  1. public render(): void {  
  2.   // Render the items in tabular format  
  3.   this.domElement.innerHTML = `  
  4.     <div class="${styles.listItemsForm}">  
  5.       <div class="${styles.Table}">  
  6.         <div class="${styles.Heading}">  
  7.           <div class="${styles.Cell}">Title</div>  
  8.           <div class="${styles.Cell}">Created</div>  
  9.           <div class="${styles.Cell}">Author</div>  
  10.         </div>  
  11.       </div>  
  12.     </div>`;  
  13.     console.log("Render");  
  14.   
  15.     this.LoadData();  
  16. }  
  17.   
  18. private LoadData(): void{  
  19.   if(this.properties.listDropDown != undefined && this.properties.ItemsDropDown != undefined){  
  20.     let url: string = this.context.pageContext.web.absoluteUrl + "/_api/web/lists/getbytitle('"+this.properties.listDropDown+"')/items?$select=Title,Created,Author/Title&$expand=Author&$filter=ID eq "+this.properties.ItemsDropDown;  
  21.     this.GetListData(url).then((response)=>{  
  22.       // Render the data in the web part  
  23.       this.RenderListData(response.value);  
  24.     });  
  25.   }  
  26. }  
  27.   
  28. private GetListData(url: string): Promise<spListItems>{  
  29.   // Retrieves data from SP list  
  30.   return this.context.httpClient.get(url).then((response: Response)=>{  
  31.      return response.json();  
  32.   });  
  33. }  
  34.   
  35. private RenderListData(listItems: spListItem[]): void{  
  36.   let itemsHtml: string = "";  
  37.   // Displays the values in table rows  
  38.   listItems.forEach((listItem: spListItem)=>{  
  39.     itemsHtml += `<div class="${styles.Row}">`;  
  40.     itemsHtml += `<div class="${styles.Cell}"><p>${listItem.Title}</p></div>`;  
  41.       itemsHtml += `<div class="${styles.Cell}"><p>${listItem.Created}</p></div>`;  
  42.       itemsHtml += `<div class="${styles.Cell}"><p>${listItem.Author.Title}</p></div>`;  
  43.   
  44.     itemsHtml += `</div>`;  
  45.   });  
  46.   this.domElement.querySelector("."+styles.Table).innerHTML +=itemsHtml;  
  47. }  


Interfaces  


The interfaces required for the sample can be found below.
  1. export interface spListItems{  
  2.   value: spListItem[];  
  3. }  
  4. export interface spListItem{  
  5.   Title: string;  
  6.   ID: string;  
  7.   Created: string;  
  8.   Author: {  
  9.     Title: string;  
  10.   };  
  11. }  
  12.   
  13. export interface spList{  
  14. Title:string;  
  15. id: string;  
  16. }  
  17. export interface spLists{  
  18.   value: spList[];  
  19. }  
The below snapshot shows the web part with the cascading dropdown fields on SPFx web part properties pane.


Summary 


Thus, you have learned how to build the cascading dropdown and populate the values dynamically on the SharePoint Framework web part properties pane.