SOLVED

How to disable Advanced web parts?

Brass Contributor

Hi all, 

in Teams I can disable all the apps I don't want my users to use. But is this possible in SharePoint as well? 

For example in the web part overview I find a lot of third party stuff 

SYN_Dominik_0-1660913974226.png

 

I only found something for three of the web parts using powershell and the web part ID but this is not working for all of the 3rd party web parts. 

 

Thanks alot for some hints :) 

16 Replies

@SYN_Dominik make sure you only give your users read permission so they can't edit pages and therefore can't access the available web parts.

 

Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

Hi Rob,
unfortunately this solves my problem only for my sites. I am the admin and want to make sure that these web parts cant be used at any site.

@SYN_Dominik 

If you are looking out for an option to limit the custom web parts to certain set of users, follow below steps:

 

1. In the SharePoint Tenant app catalog, go to classic experience.

classic-exp.png

2. In the classic experience, select the sppkg and click Share.

share.png

3. Share it with set of users, you want to have access.

 

Hope this helps.

@SYN_Dominik You can disable the advanced web parts using PowerShell command: Set-SPOTenant 

 

You need to set the -DisabledWebPartIds property with the GUID of web parts. For example GUID of few web parts are:

  • Amazon Kindle: 46698648-fcd5-41fc-9526-c7f7b2ace919
  • YouTube: 544dd15b-cf3c-441b-96da-004d5a8cea1d
  • Twitter: f6fdf4f8-4a24-437b-a127-32e66a5dd9b4
  • Embed: 490d7c76-1824-45b2-9de3-676421c997fa
  • Microsoft Bookings: d24a7165-c455-4d43-8bc8-fedb04d6c1b5
  • Stream: 275c0095-a77e-4f6d-a2a0-6a7626911518

For more information, check this documentation: Set-SPOTenant 


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Hi, unfortunately it doesn't since I am not using Custom Apps. I want to disable the Office 365 Connectors which are operating the most of the webparts of my screenshot.
Hi,
I am aware of this command. Unfortunately this is not disabling all the apps I want to disable (see screenshot)

Hi @SYN_Dominik 

 

At the moment, we can only disabled the web parts listed here: https://docs.microsoft.com/en-us/powershell/module/sharepoint-online/set-spotenant?view=sharepoint-p...

 

May be worth trying by specifying ID of the webpart you want to disable to Set-SPOTenant -DisabledWebPartIds cmdlet, if that works.

@NanddeepNachan 

But how is it possible that my test tenant is not showing the webparts?

 

Hi @SYN_Dominik 

The extra web parts you see on the other tenant, must have been added from the SharePoint store.

But they are available on every site. How do I disable this default setup?

Hi @SYN_Dominik 

Once you add a web part to your page, from "view page source" (F12) get the web part id by locating corresponding "data-sp-web-part-id" element.

 

data-sp-web-part-id.png

 

Pass on the id to Set-SPOTenant -DisabledWebPartIds cmdlet, to see if it works.

 

 

...This explains how I get rid of the 6 apps you have mentioned above. Thats what I know. The question is: How to handle all the other apps?
Not just about those 6 Apps, you can try this approach for other web parts too. Let me know, if it works.
It is just for these 6 web parts. This is documented right where you got the webpart ids:
"Currently, only the following web parts can be disabled in such a manner:"
https://docs.microsoft.com/en-us/powershell/module/sharepoint-online/set-spotenant?view=sharepoint-p...
best response confirmed by SYN_Dominik (Brass Contributor)
Solution
These web parts are only visible in team sites. Not in communication sites. Thats the reason why I was able to post a screenshot without the webparts.
I decided now for the following solution:
All these webarts I want to remove are powered by Office 365 connectors. They can be disabled with Set-OrganizationConfig -ConnectorsEnabledForSharePoint $false. This command is available in the EXO module. The webparts are still visible but they show a error message if someone tries to use them.

I tried that and is not working. Are there options to hide other seeded webparts?

1 best response

Accepted Solutions
best response confirmed by SYN_Dominik (Brass Contributor)
Solution
These web parts are only visible in team sites. Not in communication sites. Thats the reason why I was able to post a screenshot without the webparts.
I decided now for the following solution:
All these webarts I want to remove are powered by Office 365 connectors. They can be disabled with Set-OrganizationConfig -ConnectorsEnabledForSharePoint $false. This command is available in the EXO module. The webparts are still visible but they show a error message if someone tries to use them.

View solution in original post