Use tenant properties to disable Org Chart features

Sometimes tenant administrators need to disable certain Org Chart features at the tenant level.

This can be done using PowerShell with the Set-SPOStorageEntity cmdlet for SharePoint Online.

Let’s review two common cases.

Before starting

Some scripts in this article require custom scripting to be enabled on the target SharePoint site.

To enable this feature, first ensure you have Global Admin or SharePoint Admin permissions within your Microsoft 365 tenant.

Then follow these steps to allow custom scripts on a specific site:

  1. Open Microsoft 365 Admin Center and select Active sites from the left navigation menu.

Active sites menu option
  1. Select the site you wish to modify.

  2. In the details panel that appears, click on the Settings tab and locate the Custom scripts section.

custom scripts
  1. Select Allowed.

Allow custom scripts
  1. Save your changes.

Note

For security reasons, this configuration is temporary and the setting will automatically revert to Blocked after 24 hours.

To run the PowerShell cmdlets used in this article, you must have the SharePoint Online Management Shell installed.

If your environment is not yet configured, refer to the official Microsoft’s Getting Started guide.

How to disable multi-page PDF reports generation

You can disable generating multi-page PDF reports to make sure that no data goes outside your Microsoft 365 domain.

Follow these steps:

  1. Open PowerShell and connect to your SharePoint domain. Use Tenant Administrator credentials.

Connect-SPOService -Url https://contoso-admin.sharepoint.com -credential admin@contoso.com
  1. To disable the Org Chart reports use the tenant property PochDisableReports with true value. The tenant properties are stored in the tenant app catalog. Run the next command Set-SPOStorageEntity and provide the tenant app catalog site collection URL.

Set-SPOStorageEntity -Site "https://contoso.sharepoint.com/sites/appcatalog" -Key "PochDisableReports" -Value "true" -Description "Example" -Comments "Example"

Parameters:

  • Site. Specify the tenant app catalog site collection URL.

  • Key. Use the key PochDisableReports. If it is set to true, then multi-page PDF reports are disabled globally. To enable the reports back, run the same command with the false value.

  • Description. Use any description.

  • Comments. Use any comment.

How to disable Custom JavaScript in Org Chart

You can disable Custom JavaScript feature in Org Chart at the tenant level.

Follow the steps:

  1. Open PowerShell and connect to your SharePoint domain. Use Tenant Administrator credentials.

Connect-SPOService -Url https://contoso-admin.sharepoint.com -credential admin@contoso.com
  1. To disable the Custom JavaScript feature in Org Chart use the tenant property PochDisableCustomJS with true value. The tenant properties are stored in the tenant app catalog. Run the next command Set-SPOStorageEntity and provide the tenant app catalog site collection URL.

Set-SPOStorageEntity -Site "https://contoso.sharepoint.com/sites/appcatalog" -Key "PochDisableCustomJS" -Value "true" -Description "Example" -Comments "Example"

Parameters:

  • Site. Specify the tenant app catalog site collection URL.

  • Key. Use the key PochDisableCustomJS. If it is set to true, then the Custom JavaScript Org Chart feature is disabled globally. To enable the feature back, run the same command with the false value.

  • Description. Use any description.

  • Comments. Use any comment.