Office 365 Mailbox of unlicensed user

data-recoveryexchangemailboxmicrosoft-office-365shared-mailbox

I'm trying to find any softdeleted mailbox that may be in the recycle bin, due to the licence removal (office or Exchange).

Initialy I used Get-Mailbox -SoftDeletedMailbox but the results where null

After this disappointing result I did Get-MsolUser -ReturnDeletedUsers to check if I was really connected,and I got 2 results, deleted 2 other users with mailboxs, now I have 1 result.

Now I have 3 questions:

the initial one: how do I find a mailbox of an user that has lost his licence?,

and a new one: why do I have 1 result when I should have at least 2?,

and a bonus: if they where shared mailbox would it be any different?

BR

Vasco

Best Answer

Try get-mailbox -InactiveMailboxOnly. Unlicensed mailboxes are not SoftDeletedMailboxes. That only occurs after the user is deleted or the mailbox is deleted.

Shared mailboxes don’t require a license, so it doesn’t apply here.

I’m not sure I understand your second question. If you delete a user from Office 365, the associated mailbox will change to SoftDeleted status and the user will show up in the recycle bin. Try get-msoluser -all -ReturnDeletedUsers instead.