question

GlennMaxwell-2309 avatar image
0 Votes"
GlennMaxwell-2309 asked LucasLiu-MSFT commented

unable to add users to group

Hi Experts

I have mail enabled security group in exchange online. i am trying to add few users using the below syntax.

Import-csv C:\data.csv | ForEach {Add-DistributionGroupMember -Identity group@contoso.com -Member $_.users}

I am getting the below error. I am Global Admin and i dont have mailbox for my account.

You don't have sufficient permissions. This operation can only be performed by a manager of the group.
+ CategoryInfo : NotSpecified: (:) [Add-DistributionGroupMember], OperationRequiresGroupManagerException
+ FullyQualifiedErrorId : [Server=NJ1PT01RT7328,RequestId=ght56789-1234-458o-309j-26789456789f1,TimeStamp=3/19/2021 5:26:47 AM] [FailureCategory=Cmdlet-OperationRequiresGroupManagerException] D7689533,Microsoft.Exchange.Managemen
t.RecipientTasks.AddDistributionGroupMember
+ PSComputerName : outlook.office365.com



office-exchange-server-administrationoffice-exchange-online-itpro
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LucasLiu-MSFT avatar image
0 Votes"
LucasLiu-MSFT answered LucasLiu-MSFT commented

Hi @GlennMaxwell-2309 ,
You could also run the following command to check whether your account defined in Manageby properties:

 Get-DistributionGroup | ft Name, ManagedBy -AutoSize

If there is not, please run the following command to add your account.

 Set-DistributionGroup SG1 -ManagedBy @{Add="<value1>", "<value2>", …} -BypassSecurityGroupManagerCheck

The following Microsoft KB article described a similar issue, you may have a look at it to know more details: (You don't have sufficient permissions) error when you try to remove or make a change to a distribution group



If the response is helpful, please click "Accept Answer" and upvote it.
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.




· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @GlennMaxwell-2309 ,
Do suggestions above help? If the issue has been resolved, please click “Accept as answer” to mark helpful reply as an answer, this will make answer searching in the forum easier and be beneficial to other community members as well.

Thanks for your understanding.



If the response is helpful, please click "Accept Answer" and upvote it.
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 Votes 0 ·
michev avatar image
0 Votes"
michev answered

Use the -BypassSecurityGroupManagerCheck switch:

 Import-csv C:\data.csv | ForEach {Add-DistributionGroupMember -Identity group@contoso.com -Member $_.users -BypassSecurityGroupManagerCheck }


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.