Forum Discussion

Tyler Miller's avatar
Tyler Miller
Brass Contributor
Nov 07, 2017
Solved

Deleting a Room Resource

I am trying to delete a room resource from the O365 Admin Portal and I get this error:

Object reference not set to an instance of an object.

 

I also went into the Exchange Admin and tried the same thing, and get the same error. Any ideas how to delete the room resource mailbox?

  • Hi,

    I had the same problem, but was able to resolve the issue by removing the "user" email account associated with the conference room.  Afterwards, the conference room resources were automatically deleted.  Some credit goes to Galib Anwar as well, as their idea pointed me in this direction.  

12 Replies

  • Jim Rice's avatar
    Jim Rice
    Brass Contributor

    Hi,

    I had the same problem, but was able to resolve the issue by removing the "user" email account associated with the conference room.  Afterwards, the conference room resources were automatically deleted.  Some credit goes to Galib Anwar as well, as their idea pointed me in this direction.  

    • Tyler Miller's avatar
      Tyler Miller
      Brass Contributor

      Jim,

      Thanks! I went into Users, and then deleted the room resource user, and the room resource disappeared. 

    • Giovanni Francesco Solone's avatar
      Giovanni Francesco Solone
      Copper Contributor

      Hi Jim. In the meantime I solved the problem with Microsoft Support.

      And yes, the work-around consists in the deletion of the original Msoluser associated to mailbox. I translate this into PowerShell snippet:

       

      Remove-MsolUser -UserPrincipalName "sharedmailbox@contoso.com"

      Wait about a minute, then search for the deleted mailbox:

       

      Get-Mailbox -SoftDeletedMailbox

      If You want to remove the mailbox from the recycle bin, You can grep the ExternalDirectoryObjectId associated to deleted mailbox:

       

      Get-Mailbox -SoftDeletedMailbox | where {$_.Name -like "Shared Mailbox Name"} | ft ExternalDirectoryObjectId
      Get-MsolUser -ReturnDeletedUsers -objectid "Insert here the ExternalDirectoryObjectId of the Shared Mailbox" | Remove-Msoluser -RemoveFromRecycleBin -Force

      You can anyway restore the mailbox for the next 30 days following this TechNet document: https://technet.microsoft.com/library/dn186233(v=exchg.150).aspx

       

      That's all folks! :-)

      Ciao!

  • Same problem here with Shared Mailboxes. I don't know if the problem is on all our Shared, but I have about 10 mailboxes I want to delete from Exchange and I cannot execute the operation. I'm waiting for support from Microsoft (I have opened a case).

     

    Set-Mailbox -Identity resourcename -AccountDisabled $False does not solve the problem here (output message: mailbox cannot be enabled.)

  • Lauren Daly's avatar
    Lauren Daly
    Copper Contributor

    I was successful in deleting the resource in my situation using the following commands:

    get-Mailbox -resultsize unlimited | where { $_.RoomMailboxAccountEnabled -match “False”}

    The results from the above command included the resource I was attempting to delete.

    Set-Mailbox -Identity resourcename -AccountDisabled $False

    After the Set-Mailbox command (and waiting several minutes), I was able to delete the resource without issue.

     

    • Galib Anwar's avatar
      Galib Anwar
      Copper Contributor

      Try deleting users from active users list and it will remove the room resource.

  • Paul Hawkinson's avatar
    Paul Hawkinson
    Copper Contributor

    Tyler,

     

    I am having the same issue with a resource (conference room) that has been re-purposed and I want to remove it from the resources because people keep trying to schedule it.  You probably already thought of this but  since I couldn't delete it right now I went ahead and just clicked the "Hide From Address book" checkbox on the "general" section of the properties of the resource in the Exchange admin center.

     

    That way it won't show up as an option for folks scheduling rooms.

     

    Paul

  • Lauren Daly's avatar
    Lauren Daly
    Copper Contributor

    We are receiving the same message when attempting to delete a shared mailbox and a resource.

  • Have you tried doing it from PowerShell? That might return a more meaningful error message.
    • Tyler Miller's avatar
      Tyler Miller
      Brass Contributor

      Just tried it, same results, see attached.

      • Loryan Strant's avatar
        Loryan Strant
        MVP
        In that case I'd suggest logging a Service Request and getting support to look into it, because if you have the admin rights to perform the action there shouldn't be any real reason it doesn't work.

Resources