Hiding users from Global Address List (GAL)

Anonymous
2021-12-22T16:55:22+00:00

Hi, I've been working to remove former employees from my GAL and really have been struggling to find a solution that works. I have tried many different ways including: “msExchHideFromAddressLists” in AD, making sure the account has a mailNickname and email set in the attribute editor. I have tried using the PowerShell CMD "Set-ADUser 'user' -Replace @{msExchHideFromAddressLists=$true}" and it takes the command but it does not seem to sync. I have even tried to hide the user from the Exchange Admin Center and I get the attached error message. There are no errors in the DirSync section. I'm out of ideas. Thank you for your help.

Microsoft 365 and Office | Install, redeem, activate | For business | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2021-12-23T02:02:20+00:00

Hello Joey,

First the error you provided above is expected when you tried to make changes to the users who were synced from local AD, as the changes need to be done from AD then sync to Microsoft 365 Azure AD/Exchange Online.

Since you have set up the attribute "msExchHiddenFromAddressLists" in local AD, my understanding is you still have active on-premises Exchange server in your local environment, please clarify if I misunderstand your scenario, thanks. Generally if the AD account (******@contoso.com) has this attribute set to True, with mailnickname set to User, and mail attribute was set to ******@contoso.com, the msExchHiddenFromAddressList should also be synced to Azure AD side, please double check the attributes above in your local AD.

Also, as far as I know if you are using AAD Connect Sync, the attribute "msExchHiddenFromAddressList" was not synced by default, and we need to enable "Exchange Hybrid" in the AAD Connect Sync to make this attribute synced to Cloud side, please double check if you enabled "Exchange Hybrid" in your AAD Connect if you are using. if so, in this case please open the Synchronization Service Manager from your AAD Connect Sync server > Metaverse Search > Connectors > double check both connectors ( on-premises AD and Azure AD ) > check if you could find the attribute "mxExchHiddenFromAddressLists" with true there. For your reference

If you could find this attribute in both connectors from your server manager, in this time, please connect to Exchange Online PowerShell and run Get-Recipient ******@domain.com | FL *HiddenFromAddressListsEnabled* to see the result

Please feel free to let me know if you got any further updates, thanks.

Best Regards,

Oliver

Was this answer helpful?

5 people found this answer helpful.
0 comments No comments

15 additional answers

Sort by: Most helpful
  1. Anonymous
    2022-01-11T06:52:00+00:00

    Hello Joey,

    Thanks for your updates with patience.

    Since you have on-premises Exchange server now, and if this AD user also has on-premises mailbox associated, the user would be synced to Exchange Online as a mail user, may I know why you want to hide this kind of user in Exchange Online but not keep him un-synced?

    Also you mentioned you could see the attribute from both connectors has value set to True, this means this attribute should be synced to Azure AD/Microsoft 365, and it not filtered by your sync rules. In this case it is recommended first please temporarily move the AD user to an un-synced OU, then force a DirSync, then wait some minutes and go to Microsoft 365 Azure AD Admin Center https://aad.portal.azure.com/ >> Users > All Users and make sure he was not listed there after you moved him to un-synced OU, and this time you should be able to find him in the Deleted users in Azure AD. Please note don't remove him from deleted users ! as it will be hard deletedAfter that, please go back to your local AD, and move him back to the synced OU then wait for or force a DirSync then see if the attribute could be synced properly then, thanks.

    If the issue persists, I'd like to collect

    1, screenshots of the attribute value in your Synchronization Service Manager > Connectors

    1. run Get-Recipient ******@xxxx.xxx | FL from your Exchange Online PowerShell then share the full results with me

    To protect your privacy, I will send you a Private Message (PM) to collect them there.

    Best Regards,

    Oliver

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2022-01-10T17:45:43+00:00

    Hi Oliver,

    I have checked the "msExchHiddenFromAddressLists" value on both connectors and they are both listed as true in the Synchronization Service Manager.

    It seems it has somehow bypassed the sync rule?

    What next trouble-shooting steps can I take?

    Thanks

    Joey

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2022-01-10T03:02:19+00:00

    Hello Joey,

    If you confirmed the AD user's value "MsExchHiddenFromAddressLists" is set to True, however it was not synced to Exchange Online side, in this case you would need to check if your synchronization connector bypassed this attribute because of sync rule or something else. Please go to your local AD server where installed the AAD Connect Sync > open Synchronization Service Manager >Metaverse Search > search out the target AD user via any condition clause > double click the target AD user from the Search Result > in the new opened page select Connectors > double check both connectors via double click them > then see if you could find the attribute "msExchHiddenFromAddressLists" with true value there. For more details, please refer to my first reply above, thanks.

    Please feel free to let me know if you got any further updates, thanks.

    Best Regards,

    Oliver

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2022-01-07T19:46:41+00:00

    Oliver,

    I checked on Exchange Online PowerShell and it appears that value is set to False for the individual.

    Can you walk me through how to change it to true even though it is selected as true on Active Directory?

    Warm Regards,

    Joey

    Was this answer helpful?

    0 comments No comments