Format Org Chart boxes conditionally in SharePoint and Microsoft Teams

Org Chart lets you create custom style rules based on properties in your data source. This article shows common examples for the most frequent cases, that you can adapt to your needs.

Box style rules

To create a box style rule, open the Org Chart configuration wizard in the Conditional styles step. Then click Add rule.

Open view in the conditional styles panel

Name the rule and configure it based on your condition.

Format boxes by department

Resulting chart after creating conditional styles by department

Click Add condition for a new rule where the Department field is equal to Financial. Then adjust the styles and save.

Create and configure conditional styles by department

Format boxes by job title

Resulting chart after creating conditional styles by job title

Click Add condition for a new rule where the Job title field is equal to Vice-President. Then adjust the styles and save.

Create and configure conditional styles by job title

Format boxes by type

Resulting chart after creating conditional styles by box type

Click Add condition for a new rule where the Box type field is equal to Dotted. Then adjust the styles and save.

Create and configure conditional styles by box type

Format boxes by level

Resulting chart after creating conditional styles by level

Before creating the rule, enable level numbers in General settings. Save your changes, then reopen the configuration wizard.

General settings panel in the wizard

Click Add condition for a new rule where the Box level field is equal to 3. Then adjust the styles and save.

Create and configure conditional styles by level

Format boxes of external user (contractors)

Resulting chart after creating conditional styles for external users

Click Add condition for a new rule. The field you use depends on the Org Chart data source.

For SharePoint user profiles, set SPS-UserType equal to 1. Then modify styles and save the rule.

Conditional styles using a rule for external users in SharePoint user profiles

For Entra ID, set User type equal to Guest.

Conditional styles using a rule for external users in Entra ID

Styles for individual boxes

You can also create style rules from individual box styles and apply them to others with the same department, job title, or box type using the menu of the Apply button.

It automatically creates a new condition and converts the styles into a rule.

Apply menu to use individual styles in other boxes

You can also refer to our blog post that covers all these scenarios in one place with examples and visuals.