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 these 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 the SharePoint admin center and select Sites > 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 data sources

Starting from version 4.3.5, you can control which data sources are available when users create or edit an Org Chart. For example, you can prevent users from selecting Excel files or SharePoint lists in the configuration wizard.

  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

Replace the example URL and email address with your SharePoint admin URL and administrator account.

  1. To disable one or many Org Chart data sources, use the tenant property PochDisableDataSource. Since tenant properties are stored in the tenant app catalog, you need to run the next command Set-SPOStorageEntity and provide the tenant app catalog site collection URL.

For example, to disable Excel and CSV files, run:

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

Parameters:

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

  • Key: Use the key PochDisableDataSource.

  • Value: Use the following values:

    • SPList: SharePoint lists.

    • EntraID: Microsoft Entra ID.

    • SPUsers: SharePoint User Profiles.

    • Excel: Excel and CSV files.

  • Description: Use any description.

  • Comments: Use any comment.

To disable multiple data sources, use a JSON array containing their identifiers. For example, to disable SharePoint lists and Excel/CSV files, run:

$disabledOptions = @("SPList", "Excel") | ConvertTo-Json -Compress
Set-SPOStorageEntity -Site "https://contoso.sharepoint.com/sites/appcatalog" -Key "PochDisableDataSource" -Value $disabledOptions -Description "Example" -Comments "Example"

And to re-enable all data sources, set the Value parameter to an empty JSON array ([]):

Set-SPOStorageEntity -Site "https://contoso.sharepoint.com/sites/appcatalog" -Key "PochDisableDataSource" -Value [] -Description "Example" -Comments "Example"

These restrictions apply only when creating or configuring charts after the change. Existing charts that use a restricted data source will continue to work until their data source is changed, but the configuration wizard will display a warning:

Org Chart configuration wizard displaying a warning about a restricted data source

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.