So we've got a setup of on-prem AD and EX Online. They are synchronised by aad connect and we've expanded the schema in AD, so we have the attribute to hide users from GAL.
Now, we've parted with a few users recently. What we want to do is to convert their mailbox to Shared mailbox, unassign the license and hide it from GAL. The AD Account has been moved to not-synced OU. The mailbox has been deleted automatically, but we've restored it. Now we can't change its -HiddenFromAddressListsEnabled parameter, as it tells me, it's still managed by on-prem AD. How come? Doesn't matter, if I've forced removal of O365 account from powershell or not.