--- title: "The addDistributionGroupMember function fails when called using the application id authentication" slug: "the-adddistributiongroupmember-function-fails-when-called-in-a-connect-action" updated: 2022-10-28T19:19:56Z published: 2022-10-28T19:19:56Z canonical: "help.rapididentity.com/the-adddistributiongroupmember-function-fails-when-called-in-a-connect-action" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.rapididentity.com/llms.txt > Use this file to discover all available pages before exploring further. # addDistributionGroupMember function fails when called in a Connect Action **Issue Description** After updating to RapidIdentity Exchange Agent 2022.7.15.0, the addDistributionGroupMember function may fail to add a member to a Mail-enabled security group when using application id and certificate thumbprint for authentication. The following error message is returned when the function is called in a Connect action. ``` 022/10/19 19:04:03.237: TRACE exchangetest(): sessionO365 = openOffice365Connection(agenturl, undefined, undefined, "testsvc@hcid.onmicrosoft.com", , " 12345678-a345-9929-ff33-aaaa35d9ed22 ", " 444444 1234567890123456783ADC6FAAAAAAAAAA", "hcid.onmicrosoft.com", undefined) 2022/10/19 19:04:03.516: TRACE exchangetest(): result = addOffice365DistributionGroupMember(sessionO365, "exampletestgroup", "testuser@identityautomation.com") 2022/10/19 19:04:03.972: ERROR addOffice365Member(): HTTP Status: 500 Internal Server Error {"message":"ExB6FAB5|Microsoft.Exchange.Configuration.Tasks.OperationRequiresGroupManagerException|You don't have sufficient permissions. This operation can only be performed by a manager of the group.","source":"idautoExchangeAdminWS.base","exception":"idautoExchangeAdminWS.ExchangeException: ExB6FAB5|Microsoft.Exchange.Configuration.Tasks.OperationRequiresGroupManagerException|You don't have sufficient permissions. This operation can only be performed by a manager of the group.\r\n at idautoExchangeAdminWS.ExchangeSessionManager.withSession(String sessionKey, WithSessionTask task)\r\n at idautoExchangeAdminWS.ExchangeModule.<.ctor>b__1_13(Object parameters)\r\n at Nancy.Routing.Route.<>c__DisplayClass15_0.b__0(Object parameters, CancellationToken context)"}2022/10/19 19:04:03.972: TRACE exchangetest(): ==> false Completed. ``` This issue only occurs in with RapidIdentity Cloud tenant where the openOffice365Connection has been configured to use an application id and certificate thumbprint for authentication, **Resolution** If you are experiencing this issue please download and Install [RapidIdentity Exchange Agent version 2022.7.15.1](https://software-bundles.s3.amazonaws.com/singles/agents/exchangeAdminWS/idautoExchangeAdminWSInstaller-2022.7.15.1.msi) and follow the RapidIdentity Exchange Agent Install Guide found [here](https://help.rapididentity.com/docs/installing-exchange-agent-2022715?highlight=exchang#installing-exchange-agent-2022715). After updating the RapidIdentity Exchange Agent to version 2022.7.15.1, the addDistributionGroupMember function should add members to the Mail-enabled security‎ group without issue. **Additional Information** The following Microsoft documentation provides some insight into the issue: [Insufficient Permissions Moving or Changing Distribution Groups](%5Bhttps://learn.microsoft.com/en-us/exchange/troubleshoot/groups-and-distribution-lists/no-sufficient-permissions-moving-dg%5D) The cause of the issue is that the user can’t add members using add-distributiongroupmember when they are not the owner of the group see the following documentation: [add-DistributionGroupMember](https://learn.microsoft.com/en-us/powershell/module/exchange/add-distributiongroupmember?view=exchange-ps#-bypasssecuritygroupmanagercheck)