shared mailbox permissions

Glenn Maxwell 10,751 Reputation points
2022-11-23T19:51:18.507+00:00

Hi All

i am using exchange 2016 hybrid environment. i have created remote shared mailbox on exchange onprem and also i have created mail enabled security group in exchange onprem.
When i try to execute the below syntax in exchange online i am getting the below error. is this not supported? I also would like to provide SendAs permissions. experts guide me.

Add-MailboxPermission -Identity sharedmailbox@Company portal .com -User mailenabledsecuritygroup@Company portal .com -AccessRights FullAccess -Automapping $false -InheritanceType All
WARNING: An unexpected error has occurred and a Watson dump is being generated: Object reference not set to an instance of an object.
Object reference not set to an instance of an object.
+ CategoryInfo : NotSpecified: (:) [Add-MailboxPermission], NullReferenceException
+ FullyQualifiedErrorId : System.NullReferenceException,Microsoft.Exchange.Management.RecipientTasks.AddMailboxPermission
+ PSComputerName : outlook.office365.com

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,361 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,483 questions
{count} votes

Accepted answer
  1. KyleXu-MSFT 26,241 Reputation points
    2022-11-24T07:31:50.653+00:00

    @Glenn Maxwell

    You could have a look about this article: Permissions in Exchange hybrid deployments
    263825-1.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Andy David - MVP 144.9K Reputation points MVP
    2022-11-23T20:51:51.23+00:00

    You can't set the automapping for groups:

    https://learn.microsoft.com/en-us/powershell/module/exchange/add-mailboxpermission?view=exchange-ps

    Use this and it should work (use Exchange Online Powershell)

    Add-MailboxPermission  sharedmailbox@contoso.com -User mailenabledsecuritygroup@contoso.com -AccessRights FullAccess  
    

    For sendas:

    Add-RecipientPermission sharedmailbox@contoso.com  -AccessRights SendAs -Trustee mailenabledsecuritygroup@contoso.com  
    

    263623-image.png

    0 comments No comments

  2. Glenn Maxwell 10,751 Reputation points
    2022-11-24T04:46:15.253+00:00

    i am still getting the same error, even from GUI as well
    263727-error.jpg

    0 comments No comments