Following JSON should work for you:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"commandBarProps": {
"commands": [
{
"key": "new",
"hide": true
},
{
"key": "addShortcut",
"hide": true
},
{
"key": "pinToQuickAccess",
"hide": true
},
{
"key": "exportExcel",
"hide": true
},
{
"key": "automate",
"hide": true
},
{
"key": "integrate",
"hide": true
}
]
}
}
Step by step instructions here: https://www.youtube.com/watch?v=hGlaofOZIhg
Also command bar customization article here: https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/view-commandbar-formatting
Note that certain key values may not work for libraries. For example, using exportExcel
as the key will not hide the action from the command bar in libraries. Instead, you can use the key export
to achieve the desired effect.
There are different keys available depending on whether you are customizing a list or a library. To explore and discover the appropriate keys for your customization needs, you can use the helpful tool provided here: https://sharepointdashboards.com/PRE/?t71. This tool can assist you in identifying the correct keys to hide specific actions from the command bar.