Shared Mailboxes don't automap to Outlook in Exchange Online

You might see the dreadful error message when trying to open a Shared mailbox mapped to a user.
Error Message

Usually it’s a case of incorrect permissions being applied. The weird thing was that the user had no problems accessing the shared mailbox via OWA.

Further looking into the mailbox, I found that MAPI was not enabled. When I tried to enable MAPI from the GUI, it would not make the change.

As a result, I moved onto enabling the change via Powershell which led me to the true error.

Error Message

So although the user had no license (since it was a shared mailbox) it was showing it had the K1 license…which of course does not allow you access to Outlook. Essentially at one point, the mailbox licensed for K1 and although we removed that license, it never updated the properties on the Exchange side and this is why we couldn’t enable MAPI.

To resolve the issue, I went ahead and temporarily gave it an E3 license and then I had to wait around 30 minutes for that to take effect and then converted it to a shared mailbox.