SOLVED

Deleting a Room Resource

%3CLINGO-SUB%20id%3D%22lingo-sub-125249%22%20slang%3D%22en-US%22%3EDeleting%20a%20Room%20Resource%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-125249%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20delete%20a%20room%20resource%20from%20the%20O365%20Admin%20Portal%20and%20I%20get%20this%20error%3A%3C%2FP%3E%3CTABLE%3E%3CTBODY%3E%3CTR%3E%3CTD%3E%3CP%3E%3CSPAN%20class%3D%22dspBlock%20breakWord%20Error%22%3EObject%20reference%20not%20set%20to%20an%20instance%20of%20an%20object.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20also%20went%20into%20the%20Exchange%20Admin%20and%20tried%20the%20same%20thing%2C%20and%20get%20the%20same%20error.%20Any%20ideas%20how%20to%20delete%20the%20room%20resource%20mailbox%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-125249%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExchange%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-137492%22%20slang%3D%22en-US%22%3ERe%3A%20Deleting%20a%20Room%20Resource%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-137492%22%20slang%3D%22en-US%22%3E%3CP%3EJim%2C%3C%2FP%3E%0A%3CP%3EThanks!%20I%20went%20into%20Users%2C%20and%20then%20deleted%20the%20room%20resource%20user%2C%20and%20the%20room%20resource%20disappeared.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-137145%22%20slang%3D%22en-US%22%3ERe%3A%20Deleting%20a%20Room%20Resource%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-137145%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Jim.%20In%20the%20meantime%20I%20solved%20the%20problem%20with%20Microsoft%20Support.%3C%2FP%3E%0A%3CP%3EAnd%20yes%2C%20the%20work-around%20consists%20in%20the%20deletion%20of%20the%20original%20Msoluser%20associated%20to%20mailbox.%20I%20translate%26nbsp%3Bthis%20into%20PowerShell%20snippet%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3ERemove-MsolUser%20-UserPrincipalName%20%22sharedmailbox%40contoso.com%22%3C%2FPRE%3E%0A%3CP%3EWait%20about%20a%20minute%2C%20then%20search%20for%26nbsp%3Bthe%20deleted%20mailbox%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3EGet-Mailbox%20-SoftDeletedMailbox%3C%2FPRE%3E%0A%3CP%3EIf%20You%20want%20to%26nbsp%3Bremove%20the%20mailbox%20from%20the%20recycle%20bin%2C%20You%20can%20grep%20the%20ExternalDirectoryObjectId%20associated%20to%20deleted%20mailbox%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3EGet-Mailbox%20-SoftDeletedMailbox%20%7C%20where%20%7B%24_.Name%20-like%20%22Shared%20Mailbox%20Name%22%7D%20%7C%20ft%20ExternalDirectoryObjectId%0AGet-MsolUser%20-ReturnDeletedUsers%20-objectid%20%22Insert%20here%20the%20ExternalDirectoryObjectId%20of%20the%20Shared%20Mailbox%22%20%7C%20Remove-Msoluser%20-RemoveFromRecycleBin%20-Force%3C%2FPRE%3E%0A%3CP%3EYou%20can%20anyway%20restore%20the%20mailbox%20for%20the%20next%2030%20days%20following%20this%20TechNet%20document%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechnet.microsoft.com%2Flibrary%2Fdn186233(v%3Dexchg.150).aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Ftechnet.microsoft.com%2Flibrary%2Fdn186233(v%3Dexchg.150).aspx%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThat's%20all%20folks!%20%3A)%3C%2Fimg%3E%3C%2FP%3E%0A%3CP%3ECiao!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-137070%22%20slang%3D%22en-US%22%3ERe%3A%20Deleting%20a%20Room%20Resource%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-137070%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3EI%20had%20the%20same%20problem%2C%20but%20was%20able%20to%20resolve%20the%20issue%20by%20removing%20the%20%22user%22%20email%20account%20associated%20with%20the%20conference%20room.%26nbsp%3B%20Afterwards%2C%20the%20conference%20room%20resources%20were%20automatically%20deleted.%26nbsp%3B%20Some%20credit%20goes%20to%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F97928%22%20target%3D%22_blank%22%3EGalib%20Anwar%3C%2FA%3E%26nbsp%3Bas%20well%2C%20as%20their%20idea%20pointed%20me%20in%20this%20direction.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CDIV%20class%3D%22post-author-login%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-135960%22%20slang%3D%22en-US%22%3ERe%3A%20Deleting%20a%20Room%20Resource%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-135960%22%20slang%3D%22en-US%22%3E%3CP%3ESame%20problem%20here%20with%20Shared%20Mailboxes.%20I%20don't%20know%20if%20the%20problem%20is%20on%20all%20our%20Shared%2C%20but%20I%20have%20about%2010%20mailboxes%20I%20want%20to%20delete%20from%20Exchange%20and%20I%20cannot%20execute%20the%20operation.%20I'm%20waiting%20for%20support%20from%20Microsoft%20(I%20have%20opened%20a%20case).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESet-Mailbox%20-Identity%20%3CEM%3Eresourcename%3C%2FEM%3E%20-AccountDisabled%20%24False%20does%20not%20solve%26nbsp%3Bthe%20problem%20here%20(output%20message%3A%20mailbox%20cannot%20be%20enabled.)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-131369%22%20slang%3D%22en-US%22%3ERe%3A%20Deleting%20a%20Room%20Resource%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-131369%22%20slang%3D%22en-US%22%3E%3CP%3ETry%20deleting%20users%20from%20active%20users%20list%20and%20it%20will%20remove%20the%20room%20resource.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-126710%22%20slang%3D%22en-US%22%3ERe%3A%20Deleting%20a%20Room%20Resource%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-126710%22%20slang%3D%22en-US%22%3E%3CP%3EI%20was%20successful%20in%20deleting%20the%20resource%20in%20my%20situation%20using%20the%20following%20commands%3A%3C%2FP%3E%3CP%3Eget-Mailbox%20-resultsize%20unlimited%20%7C%20where%20%7B%20%24_.RoomMailboxAccountEnabled%20-match%20%E2%80%9CFalse%E2%80%9D%7D%3C%2FP%3E%3CP%3EThe%20results%20from%20the%20above%20command%20included%20the%20resource%20I%20was%20attempting%20to%20delete.%3C%2FP%3E%3CP%3ESet-Mailbox%20-Identity%20%3CEM%3Eresourcename%3C%2FEM%3E%20-AccountDisabled%20%24False%3C%2FP%3E%3CP%3EAfter%20the%20Set-Mailbox%20command%20(and%20waiting%20several%20minutes)%2C%20I%20was%20able%20to%20delete%20the%20resource%20without%20issue.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-126693%22%20slang%3D%22en-US%22%3ERe%3A%20Deleting%20a%20Room%20Resource%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-126693%22%20slang%3D%22en-US%22%3E%3CP%3ETyler%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20having%20the%20same%20issue%20with%20a%20resource%20(conference%20room)%20that%20has%20been%20re-purposed%20and%20I%20want%20to%20remove%20it%20from%20the%20resources%20because%20people%20keep%20trying%20to%20schedule%20it.%26nbsp%3B%20You%20probably%20already%20thought%20of%20this%20but%26nbsp%3B%20since%20I%20couldn't%20delete%20it%20right%20now%20I%20went%20ahead%20and%20just%20clicked%20the%20%22Hide%20From%20Address%20book%22%20checkbox%20on%20the%20%22general%22%20section%20of%20the%20properties%20of%20the%20resource%20in%20the%20Exchange%20admin%20center.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThat%20way%20it%20won't%20show%20up%20as%20an%20option%20for%20folks%20scheduling%20rooms.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPaul%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-126685%22%20slang%3D%22en-US%22%3ERe%3A%20Deleting%20a%20Room%20Resource%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-126685%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20having%20the%20same%20issue.%26nbsp%3B%20Does%20anyone%20have%20advice%20other%20than%20%22logging%20a%20service%20request%22...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20from%20PowerShell%20as%20well%20with%20the%20same%20result.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-125796%22%20slang%3D%22en-US%22%3ERe%3A%20Deleting%20a%20Room%20Resource%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-125796%22%20slang%3D%22en-US%22%3EIn%20that%20case%20I'd%20suggest%20logging%20a%20Service%20Request%20and%20getting%20support%20to%20look%20into%20it%2C%20because%20if%20you%20have%20the%20admin%20rights%20to%20perform%20the%20action%20there%20shouldn't%20be%20any%20real%20reason%20it%20doesn't%20work.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-125607%22%20slang%3D%22en-US%22%3ERe%3A%20Deleting%20a%20Room%20Resource%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-125607%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20are%20receiving%20the%20same%20message%20when%20attempting%20to%20delete%20a%20shared%20mailbox%20and%20a%20resource.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-125580%22%20slang%3D%22en-US%22%3ERe%3A%20Deleting%20a%20Room%20Resource%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-125580%22%20slang%3D%22en-US%22%3E%3CP%3EJust%20tried%20it%2C%20same%20results%2C%20see%20attached.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-125264%22%20slang%3D%22en-US%22%3ERe%3A%20Deleting%20a%20Room%20Resource%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-125264%22%20slang%3D%22en-US%22%3EHave%20you%20tried%20doing%20it%20from%20PowerShell%3F%20That%20might%20return%20a%20more%20meaningful%20error%20message.%3C%2FLINGO-BODY%3E
Contributor

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?

12 Replies
Have you tried doing it from PowerShell? That might return a more meaningful error message.

Just tried it, same results, see attached.

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

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.

I am having the same issue.  Does anyone have advice other than "logging a service request"...

 

I tried from PowerShell as well with the same result.

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

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.

 

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

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.)

Best Response confirmed by Tyler Miller (Contributor)
Solution

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.  

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!

Jim,

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