Gave godly power to user with MailboxPermission

Guido Pettinari 1 Reputation point
2020-07-24T16:03:39.053+00:00

Hello!

I was hoping you could help me with a problem I am having with 365.
I gave a user in my 365 domain (say mike@ssss .com) full permissions on all other mailboxes, with this Powershell command:

Get-Mailbox -ResultSize unlimited -Filter "(RecipientTypeDetails -eq 'UserMailbox') -and (Alias -ne 'Admin')" | Add-MailboxPermission -User mike@example.com -AccessRights FullAccess -InheritanceType All  

After running the command, all mailboxes in the domain appeared in the user's Outlook client, which is not ideal from the privacy point of view :-(

Is there a way to revert the change and make the user a normal user again?

Thank you very much,
Guido

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,578 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Guido Pettinari 1 Reputation point
    2020-07-24T16:44:53.547+00:00

    I guess I found out how to do it :-)

    I just needed to run the Remove-MailboxPermissions command:

    Remove-MailboxPermission -Identity user -User mike@example.com -AccessRights FullAccess -InheritanceType All
    

    where user is the mailbox I want to "hide" from Mike.

    I have run the command with different -Identity arguments as many times as the users in the domain... obviously skipping Mike's own user.

    Finally, I checked that the list of users on which Mike has permissions was empty, by running:

    Get-Mailbox -ResultSize unlimited -Filter "(RecipientTypeDetails -eq 'UserMailbox') -and (Alias -ne 'Admin')" | Get-MailboxPermission -User mike@example.com
    

    Hope it will help somebody!

    Cheers,
    Guido

    0 comments No comments

  2. Joyce Shen - MSFT 16,671 Reputation points
    2020-07-27T02:26:05.777+00:00

    Thanks for sharing the information above, you could mark your reply above to help other users who encounter the same issue and read this thread.

    In addition, users granted full access permission will show in the delegator's outlook client is a feature called auto-mapping, if you want to grant full access permission without enabling automapping, can just set the parameter -AutoMapping $false

    For more information and usage about the command: Add-MailboxPermission

    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.