Incorrect MailboxOwnerId in Exchange Online Mailbox

Jim Hill 96 Reputation points
2020-09-14T16:01:00.727+00:00

One of my users has an incorrect MailboxOwnerId. The value on their account is one for a former employee who had originally taken over that mailbox many years ago. All of our other users show the correct values, but this one has created a variety of issues for that user across the Office 365 products.

Question, how can I change the MailboxOwnerId attribute? The Set-User command does not list that attribute as able to be adjusted:
Set-User Powershell command

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,191 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,381 questions
{count} votes

Accepted answer
  1. Jim Hill 96 Reputation points
    2020-09-17T11:08:09.75+00:00

    Somehow the MailboxOwnerId was the value for a deleted user. I think they took over that user's mailbox at some point. Anyway, Microsoft 365 support gave me this easy Powershell script running in Exchange Powershell. This reset the MailboxOwnerId with one quick command:

    Set-Mailbox email@keyman .com -Name "email"

    Where "email" is the MailboxOwnerId. That did the trick. Thanks everyone for responding.


2 additional answers

Sort by: Most helpful
  1. Rich Matheisen 45,091 Reputation points
    2020-09-14T18:32:23.237+00:00

    If that mailbox is used only by that one user then the easiest way to deal with this is to use Disable-Mailbox (make sure the MailboxRetention period isn't so short that the information store is going to immediately delete the mailbox!) and then reconnect the mailbox the the user.

    You can use the EAC to do this pretty easily: disable-or-delete-mailboxes

    Because all the mail-related attributes will be removed from the AD for that user be sure you have the set of values that exist on that mailbox now! Once you reconnect the mailbox you can add the missing attributes back to the user (e.g. custom attributes, e-mail addresses that your e-mail address policies won't create, etc.).


  2. KyleXu-MSFT 26,211 Reputation points
    2020-09-15T02:59:51.52+00:00

    @Jim Hill

    One of my users has an incorrect MailboxOwnerId

    Where and how do you find this attribute? As far as I know, the "MailboxOwnerId" only used in InboxRule. I don't find this attribute was used at any other place.

    When you delete a mailbox, you could delete mailbox permanently with command below:

    Remove-Mailbox -Identity <Identity> -Permanent $true  
    

    You can also find and delete AAD account permanently as below:
    24733-qa-kyle-0915105708.png


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.