Back to view formats
View formattingSharePoint Online

Hide All Buttons on Command Bar

This sample demonstrates hiding all buttons on the command bar.

Hide All Buttons on Command Bar formatting preview
Sample preview · View original image

Copy. Apply. Make it yours.

Get this format

1 definition

Review the requirements below, then paste this JSON into the matching formatting panel. Show me where.

Use your list's internal column names and replace any tenant-specific URLs or flow IDs. Formatting is presentation, not a way to secure data.

View formatting
Download JSON
{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/view-formatting.schema.json",
  "commandBarProps": {
    "commands": [
      { "key": "new", "hide": true },
      { "key": "newFolder", "hide": true },
      { "key": "newWordDocument", "hide": true },
      { "key": "newExcelWorkbook", "hide": true },
      { "key": "newPowerPointPresentation", "hide": true },
      { "key": "newOneNoteNotebook", "hide": true },
      { "key": "newFormsForExcel", "hide": true },
      { "key": "newVisioDrawing", "hide": true },
      { "key": "upload", "hide": true },
      { "key": "UploadCommand", "hide": true },
      { "key": "uploadFile", "hide": true },
      { "key": "uploadFileCommand", "hide": true },
      { "key": "uploadFolder", "hide": true },
      { "key": "uploadFolderCommand", "hide": true },
      { "key": "open", "hide": true },
      { "key": "share", "hide": true },
      { "key": "copyLink", "hide": true },
      { "key": "download", "hide": true },
      { "key": "rename", "hide": true },
      { "key": "copyTo", "hide": true },
      { "key": "moveTo", "hide": true },
      { "key": "delete", "hide": true },
      { "key": "edit", "hide": true },
      { "key": "comment", "hide": true },
      { "key": "editNewMenu", "hide": true },
      { "key": "powerBI", "hide": true },
      { "key": "powerBIVisualizeList", "hide": true },
      { "key": "automate", "hide": true },
      { "key": "automateCreateRule", "hide": true },
      { "key": "automateManageRules", "hide": true },
      { "key": "powerAutomate", "hide": true },
      { "key": "powerAutomateCreateFlow", "hide": true },
      { "key": "powerAutomateSeeFlows", "hide": true },
      { "key": "powerAutomateConfigureFlows", "hide": true },
      { "key": "aiBuilderCreate", "hide": true },
      { "key": "aiBuilderGoto", "hide": true },
      { "key": "aiBuilder", "hide": true },
      { "key": "alertMe", "hide": true },
      { "key": "newLink", "hide": true },
      { "key": "integrate", "hide": true },
      { "key": "manageAlert", "hide": true },
      { "key": "powerApps", "hide": true },
      { "key": "powerAppsCreateApp", "hide": true },
      { "key": "powerAppsSeeAllApps", "hide": true },
      { "key": "powerAppsCustomizeForms", "hide": true },
      { "key": "viewDocumentUnderstandingModels", "hide": true },
      { "key": "versionHistory", "hide": true },
      { "key": "openInImmersiveReader", "hide": true },
      { "key": "classifyAndExtract", "hide": true },
      { "key": "checkOut", "hide": true },
      { "key": "checkIn", "hide": true },
      { "key": "undoCheckOut", "hide": true },
      { "key": "propertiesCommand", "hide": true },
      { "key": "pinItemCommand", "hide": true },
      { "key": "exportExcel", "hide": true },
      { "key": "exportCSV", "hide": true },
      { "key": "export", "hide": true },
      { "key": "editInGridView", "hide": true },
      { "key": "exitGridView", "hide": true },
      { "key": "syncCommand", "hide": true },
      { "key": "uploadTemplate", "hide": true },
      { "key": "uploadTemplateCommand", "hide": true },
      { "key": "addTemplate", "hide": true },
      { "key": "openInOfficeOnline", "hide": true },
      { "key": "openInOfficeClient", "hide": true },
      { "key": "addShortcutToOneDriveCommand", "hide": true },
      { "key": "PinToQuickAccessCommand", "hide": true },
      { "key": "unpinFromQuickAccess", "hide": true },
      { "key": "manageForms", "hide": true },
      { "key": "favoriteCommand", "hide": true },
      { "key": "createCopilot", "hide": true },
      { "key": "undo", "hide": true },
      { "key": "newComposite", "hide": true },
      { "key": "stasherContextMenuCommand", "hide": true },
      { "key": "syntexTranslateCommand", "hide": true },
      { "key": "requestApprovalCommand", "hide": true },
      { "key": "GoToChannelInTeams", "hide": true },
      { "key": "PublishCommand", "hide": true},
      { "key": "properties", "hide": true},
      { "key": "syntexAutofillColumnsCommandPublicKey", "hide": true},
      { "key": "Copilot", "hide": true},
      { "key": "workflowsCommand", "hide": true}
    ]
  }
}
Schema compatibility review notes

This historical definition differs from the pinned Microsoft schema. This may indicate an unsupported pattern or a schema limitation. Check the original requirements and test in your tenant before use.

  • /commandBarProps/commands/9/key must be equal to one of the allowed values

From the contributor

How to use this sample

Summary

Hide everything that can be hidden on the command bar. My use case was to embed a summary into a SharePoint page using an iFrame and keep things as clean as possible.

SharePoint Lists screenshot of the sample

SharePoint Document Library SharePoint Document Library

View requirements

  • You'll want this to be it's own list view, so the hidden buttons aren't more difficult to access when you actually need them.

Sample

Solution Author(s)
commandbar-hide-all.json gitjego & Watana

Version history

Version Date Comments
1.0 December 24, 2024 Initial release
1.1 May 3, 2025 Added/updated command bar props/images
1.2 June 28, 2025 Added PublishCommand, properties
1.3 January 13, 2026 Added syntexAutofillColumnsCommandPublicKey
1.4 July 31, 2026 Added Copilot & workflowsCommand

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.


Additional notes

The buttons to be hidden must be explicitly named, and it is likely that there will be new buttons that need to be hidden in new releases from Microsoft. This code currently hides everything listed in Microsoft's Documentation. Refer to this if you are seeing commands not be hidden, and add a line as needed. If you can find a way to hide the viewSelector, please pull request. :)