To assign a group permissions to a mailbox in Office 365, the group needs to be enabled as a distribution group. To do so, you can use the cmdlet Enable-DistributionGroup “groupname”
However, you may encounter the following error:
[PS] C:\Windows\system32>Enable-DistributionGroup sharedmailbox-finance-fullpermission
Enable-DistributionGroup : Unable to generate the e-mail address. Unable to load address module ‘C:\Program
Files\Microsoft\Exchange Server\V15\Mailbox\address\SMTP\AMD64\inproxy.dll’ for address type ‘SMTP’. Additional
message: ‘Access is denied’.
At line:1 char:1
+ Enable-DistributionGroup sharedmailbox-finance-fullpermission
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Enable-DistributionGroup], RusException
+ [FailureCategory=Cmdlet-RusException] DA0E5456,Microsoft.Exchange.Management.RecipientTasks.EnableDistributionGroup
Solution
Likely, you’re trying to run the cmdlet in an unelevated powershell session. Open your Powershell session “As administrator”, elevated with UAC, and try again. It should then run successfully:
[PS] C:\Windows\system32>Enable-DistributionGroup sharedmailbox-finance-fullpermission Name DisplayName GroupType PrimarySmtpAddress ---- ----------- --------- ------------------ sharedmailbox-finance-fullpermission sharedmailbox-finance-fullpermission Universal, SecurityEnabled sharedmailbox-finance-fullpermission