Hidden from address lists issue

So we have our CFO who does not show up in the Org chart when we have the following in the custom script.

return itemData[“SPS-HideFromAddressLists”] != “True”&&!((itemData[“Department”].contains(“Trn”))||(itemData[“Title”].contains(“Company Intern”)));

When we remove the SPS-HideFromAddressLists from the script he shows up. here is some background. This account like all of our other accounts are sync’d from Active Directory. This account did have the msExchanHideFromAddressLists set to True back two months ago but this entry has been removed for quite some time now. He is not hidden in Office 365 but apparently the user profile service still shows him as hidden. Unfortunately since this is Sharepoint Online we cannot modify the SPS-HideFromAddresslists attribute since it is sync’d with O365 AD.
Note: When you navigate to the user’s profile via a Sharepoint online (delve search) he does show up in the organization section. Is there a workaround perhaps in the script that I can make to include him. thanks for any help

Hi,
Thank you for your message.

This is not the problem with OrgChart, because OrgChart just shows your user profiles structure. Probably, you have some problem with the sync with AD or your user profiles service. Сoncerning the filtration in OrgChart, I can offer you add the filtration rule by account name for this user:

return !((itemData["Department"].contains("Trn")) || (itemData["Title"].contains("Company Intern"))) ||  itemData["AccountName"] == "UserAccountName";

Best regards
Evgeniy Kovalev
Plumsail Team