So today I had a customer witch has move there On-prem Exchange to Office 365 (Exchange online). The old Exchange server was long gone and therefore not more Exchange management tools. The customer wanted to hide a user form the global address list (GAL), and had found the msExchHideFromAddressLists attribute in the attribure editor on that user and set it to “TRUE”. However in the user still was showing up in the GAL.
 User properties
When I ran the PowerShell command to see the state of the msExchHideFromAddressLists attribute “get-Mailbox -Identity | fl HiddenFromAddressListsEnabled” I the result : “HiddenFromAddressListsEnabled : False” back, witch was not what I where looking for. After some poking around I found a post on a MS forum, talking about this and it turned out the “msExchHideFromAddressLists attribute” was not being synced at all and it should be added to the Synchronization rule. You can do this with the “Synchronization Rules Editor” witch can by found on the server with Azure AD Connect install.
 Sync Ruld Editor
In the “Inbound” rule select “in from AD – User Common” click Edit and “No” to continue editing the current rule.
Sync Ruld Editor

Add msExchHideFromAddressLists attribute

Then select “Transformations” and click “Add Transformation” The new transformation should be : FlowType=Direct, Target Attribute=msExchHideFromAddressLists and Source=msExchHideFromAddressLists. Merge type=update. Then click Save. Now from Powershell, on the server with Azure AD Connect sync installed, type “Start-ADSyncSyncCycle -PolicyType Delta” and wait (I waited about 5-8 min.) for the update to take effect. You can the “get-Mailbox -Identity | fl HiddenFromAddressListsEnabled” command, this should result in: “HiddenFromAddressListsEnabled : True”.
I hope you can use this information and thank you for reading. Leave comment below and have a nice day!