Use specific Active Directory Group as source

Is it possible to use a specific AD group as a data source rather than using complex filters?

For example, the management team within a company belong to various departments and have various titles. There is no AD attribute "management team" being used, but all users are added to a specific OU in Active Directory.
I'd like to be able to specify that OU as the data source.

Hi @agoodwin,

Plumsail Org Chart has no way to interact with the AD groups directly, it can only get the data from SharePoint User Profiles. The preferable way would be to create a SharePoint user profile that stores data on the user's AD groups, however, to the best of my knowledge, there no out-of-the box way to sync user profile properties with AD groups.
The other workaround is to create SharePoint site groups that will duplicate you AD OUs.
Then you can use the fact of a user's group membership in the Filtration rule.
For example, if you add this script to your Org Chart site, only the users that belong to the "Site owners" group. Just change the "Site" to your site's name in the collGroup.getByName method.

function(itemData){
   var user_ids = []  // initialize array of users in the group
   retrieveAllUsersInGroup()  // retrieve user id's
   return user_ids.includes(itemData.AccountName);  /  filter users in the array
   
   // below is a helper function to retrieve users in a given group
   var collUser;
  function retrieveAllUsersInGroup() {
      var clientContext = new 
      SP.ClientContext("https://plumsailuspenskiy.sharepoint.com/sites/OrgChart/");
      var collGroup = clientContext.get_web().get_siteGroups();
      var oGroup = collGroup.getByName("OrgChart Owners");
      collUser = oGroup.get_users();
      clientContext.load(collUser);
      clientContext.executeQueryAsync(onQuerySucceeded, onQueryFailed);
  }
 function onQuerySucceeded() {
 
      var userEnumerator = collUser.getEnumerator();
     while (userEnumerator.moveNext()) {
      var oUser = userEnumerator.get_current();
      user_ids.push(oUser.get_loginName())
      }
  }
  function onQueryFailed(sender, args) {
 console.log('Request failed');
 }
}

Here's the result for my site, only the site owner left:
image