Revoke permissions

Rising Flight 4,536 Reputation points
2024-01-20T21:26:02.8466667+00:00

I have created a shared mailbox in onprem and migrated to online. i have given SendonBehalf permission from exchange online powershell using the below syntax.

Set-Mailbox -Identity "smailbox@mydomain.com" -GrantSendOnBehalfTo "myuser@mydomain.com"

How do i revoke this permission, will the below syntax work.

Remove-MailboxPermission -Identity smailbox@mydomain.com -User myuser@mydomain.com -AccessRights SendOnBehalfTo 
Microsoft Exchange Online
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,530 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,633 questions
Microsoft Exchange Hybrid Management
Microsoft Exchange Hybrid Management
Microsoft Exchange: Microsoft messaging and collaboration software.Hybrid Management: Organizing, handling, directing or controlling hybrid deployments.
2,103 questions
{count} votes

Accepted answer
  1. Shaofan Lv-MSFT 6,915 Reputation points Microsoft Vendor
    2024-01-22T06:22:23.04+00:00

    Hello @Rising Flight

    -AccessRights should not support the value "SendOnBehalfTo".

    But you could try setting "-GrantSendOnBehalfTo" to NULL.

    Set-Mailbox -Identity "smailbox@mydomain.com" -GrantSendOnBehalfTo $null User's image

    Kind Regards


    If the answer is helpful, please click "Accept Answer" and kindly upvote it.

    3 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Amit Singh 4,896 Reputation points
    2024-01-22T04:42:16.3566667+00:00

    The syntax you provided is almost correct, but the cmdlet you should use is Remove-MailboxPermission instead of Remove-MailboxPermission. Here's the right syntax:

    Remove-MailboxPermission -Identity "smailbox@mydomain.com" -User "myuser@mydomain.com" -AccessRights SendOnBehalfTo

    This command will remove the "Send on Behalf" permission for the specified user from the shared mailbox. Ensure you run this command in the Exchange Online PowerShell environment.

    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.