In the previous blog here, we looked at how to deploy and install SharePoint Apps. Now let’s look at installing SharePoint Framework extensions – Listview command sets programmatically.

SharePoint CSOM

SharePoint Framework has three type of extensions that could be created – Application customiser, Listview command sets and Field customisers. In this blog, we will look at adding list view command sets programmatically.

Listview command extensions are actually custom actions installed in a library or list. Hence to activate it we will go to the library/list, find the installed custom actions, if not installed we will install the new custom action. Below is the code for that.


We could also use PnP PowerShell to add the Library extension onto a page using the code below

Hence, above we saw how we could add extensions onto a library or list using CSOM or PowerShell

Happy Coding!!


  1. Hi Asish
    Thank you for your post. It’s quite helpful.
    But in my case, I need one step back.
    My App is installed. I can see that using AppManager(clientContext);

    When I’m trying to get the app using,
    var components = page.AvailableClientSideComponents();

    it’s not getting, because it’s in [Apps you can add] state, not in added state.
    How to achieve this condition.
    I’m provisioning modern site, I want to add a Custom SPFX webpart into a newly added page.
    Any help on this is much appreciated.

    Thank you


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s