Avatar of Jon Ellsworth
Jon Ellsworth

asked on 

Given a User's SID, how to remove O365 mailbox AccessRights

I ran a powershell report to extract AccessRights for all O365 mailboxes. A small portion of them only listed SID that still has access rights. Is there a powershell command that can be run to remove the access rights from those SID references? Approximately half of those SIDs no longer exist in AD. For the most part, we don't remove user accounts. The SIDs could have referenced a user that existed prior to our Exchange 2010/O365 hybrid environment.

If you could also please help me build a command to remove access rights given UPN and Mailbox. I also have the AccessRights listed per entry.

Thank you
Active DirectoryExchangeMicrosoft 365Powershell

Avatar of undefined
Last Comment
Todd Nelson

8/22/2022 - Mon