Deleted user still showing up in room Calendar user list PowerShell

Ahasub Chowdhury 16 Reputation points
2020-08-18T06:45:16.347+00:00

Hi all,

We are using PowerShell to provide room calendar permission to the users which is more efficient as opposed to GUI because it doesn't give you access to the mailbox just the calendar.

As a part of our exit process usually delete user account from AD when they leave the organisation. I recently noticed that the users who are deleted from AD are still showing up when I check room calendar permission using Get-MailboxFolderPermission room:\calendar. If I try to remove them using Remove-MailboxFolderPermission cmdlet it gives me the following error.

18208-error-removing-permission.png

I would appreciate your suggestions on this. Thank you so much.

Kind regards,

Ahasub

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,182 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Joyce Shen - MSFT 16,701 Reputation points
    2020-08-19T02:33:05.107+00:00

    What's the result if you use Get-MailboxFolderPermission -Identity qaz@Company portal .com:\Calendar -User exuser1? If you can use this command get result, you could try running this.

    Get-MailboxFolderPermission -Identity ******@contoso.com:\Calendar -User exuser1 | Remove-MailboxFolderPermission  
    

    Are you using Exchange online? Here is a similar thread discussed the issue you encountered: exchangeonlinepowershellproblem-removing-calendar-permissions-for-a-deleted-user-in-office-365

    Remove MSOLuser

    remove-msoluser –userprincipalname ******@UPN.com  
    

    From The Recycle Bin

    remove-msoluser –userprincipalname ******@UPN.com -RemoveFromRecyclebin  
    

    Then run

    Get-MailboxFolderPermission sjames:\calendar  
    

    To Remove

    Remove-MailboxFolderPermission sjames:\calendar -User "SID name" -Confirm:$false  
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.