Hi Michelle,
A couple of weeks ago I received the same question of a user.
I ended up formatting the view 'All documents' of the document libraries.
It might not be the prettiest solution, since every user that has 'Edit' permissions (or more) will be able to create a new public/personal view within the document library, and this will reset all command bar properties. But for our guests, this solution was sufficient.
I believe the property you are looking for is 'sync'.
Your JSON-schema will look like this:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"commandBarProps": {
"commands": [
{"key":"sync","hide": true}
]
}
}
More information:
- https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/view-commandbar-formatting
- https://github.com/SharePoint/sp-dev-docs/issues/8546
You can probably automate this too in all sorts of ways (PowerShell, REST API)