In Microsoft Exchange Server 2019 or Exchange Server 2016, you can set the value of the hideDLMembership attribute to true for a distribution group by using the Active Directory Service Interfaces (ADSI) Edit, to make sure users can't expand the group to see the membership. It works fine in the Outlook on the Web client and the Outlook for Windows client. However, users who are using the Outlook for Mac client can still expand the group and see the membership.
This issue occurs because the EWS doesn't check the hideDLMembership attribute.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
To fix this issue, install one of the following updates:For Exchange Server 2019, install the Cumulative Update 1 for Exchange Server 2019 or a later cumulative update for Exchange Server 2019.