Filter by Security Group

Is there a way to exclude users from the Org Chart who are a member of a security group called "Leavers"

Thanks

Hello, @hutchisoni

Unfortunately, you can't filter chart elements retrieving data from AD. Org Chart can turn only to SharePoint to get user data and use custom JavaScript to work in current SP context. I see here two options:

  1. You could duplicate your AD security group as a SharePoint one on the site where Org Chart is placed. Then in Org Chart, you retrieve members of the latter and filter them (by their name, for example) using JavaScript. You can use prerenderAction(completed) method to perform some actions using JavaScript before the chart is loaded.

  2. You could create a property for SharePoint user profiles "IsLeaver" and fill it manually or using PowerShell on the basis of membership in the security group. Then, when the property is filled for the proper users, you can filter them by it in Org Chart. It is more preferable option since doesn't affect performance and allow you to avoid complex JavaScript code in Org Chart which is not intended for it. JavaScript should be used for minor actions or for using specific Org Chart methods and properties.