Unauthorized when using Add-DistributionGroupMember to add user to Exchange managed Distribution

Shawn Imholte 20 Reputation points
2024-10-17T17:37:22.63+00:00

I followed the steps in this article https://learn.microsoft.com/en-us/powershell/exchange/connect-exo-powershell-managed-identity?view=exchange-ps&WT.mc_id=M365-MVP-9501 to use my Azure Automation System managed identity to connect to ExchangeOnline but when I use the CmdLet Add-DistributionGroupMember I get an Unauthorized exception. I tried adding the -BypassSecurityGroupManagerCheck flag but it still comes back Unauthorized. I followed Step 5 in the article mentioned above so that Identity is already an ExchangeAdministrator. What other permissions does that user need?

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,171 questions
Windows for business Windows Server User experience PowerShell
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-10-18T02:45:23.4566667+00:00

    Hi,@Shawn Imholte

    Thanks for posting your question in the Microsoft Q&A forum.

    Based on your description, you are using Azure to host Exchange Online. i am not sure if it is Azure that is affecting the use of Add-DistributionGroupMember. Can you describe specifically how you are using Add-DistributionGroupMember? It is recommended that you disconnect Azure Hosted Exchange Online first and only run commands in Exchange Online PowerShell.


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.