Before we proceed, depending on your environment, connect to Exchange Online remote PowerShell.
Remove Mailbox Permission (Full Access and Send As)
PS C:\WINDOWS\system32> Remove-MailboxPermission -Identity “[email protected]” -User “[email protected]” -AccessRights FullAccess
-InheritanceType All -Confirm:$false
Identity – user or shared mailbox to be impacted
User – User that will get permission
AccessRights – permissions either FullAccess, SendAs …etc
List all User and Shared Mailboxes that a User has Permission
PS C:\WINDOWS\system32> Get-Mailbox -RecipientTypeDetails UserMailbox,SharedMailbox -ResultSize Unlimited | Get-MailboxPermission -User [email protected]
List all Mailboxes that a User has SendAs Permission
PS C:\WINDOWS\system32> Get-Mailbox | Get-RecipientPermission -Trustee [email protected]
Add Mailbox Permission
PS C:\WINDOWS\system32> Add-MailboxPermission –Identity “[email protected]” –User “[email protected]” –AccessRights FullAccess
Grant Mailbox Access Permission to Microsoft365 Mailbox