We are in Exchange Hybrid mode. I have a need to query the property msExchHideFromAddressLists using get-msoluser or get-azureaduser. I checked Azure Ad Connect and the property setup to sync. If I hide the mailbox in the on-premise exchange tool, the mailbox gets hidden online.
Neither of these commands bring back a result;
get-msoluser -userprincipalname user.name@mycomany.com | Select msexchhidefromaddresslists
get-azureaduser -objectID user.name@mycomany.com | select DisplayName, msexchhidefromaddresslists
I am able to see the mailbox is hidden using;
get-mailbox -identity user.name@mycompany.com | Select HiddenFromAddressListsEnabled