locked
Powershell Connect AppOnly to EXO - Anyone able to use command set-unifiedgroup RRS feed

  • Question

  • We want to use App-Only authentication in a script to change M365-Unified Group PrimarySMTPAddress and Alias

    i can connect with App-Only Auto as described here App-only authentication | Microsoft Docs and use Get-Unifiedgroup or even use set-mailbox to change EMailAddresses. But if i try to use set-unifiedgroup command it will always fail with following error:

    We failed to update the unified group. Please try again later.
        + CategoryInfo          : NotSpecified: (:) [Set-UnifiedGroup], TaskException
        + FullyQualifiedErrorId : [Server=GV0P278MB0001,RequestId=00e66d64-0be9-49c3-92a1-44147c1d08fd,TimeStamp=17/12/2020 08:36:05] [FailureCategory=Cmdlet-TaskException] 74BF6179,Microsoft.Exchange.Management.RecipientTasks.SetUnifiedGroup
        + PSComputerName        : outlook.office365.com

    as support suggested, i have even added the App to the Global Admin Role and wait 24hours - still same error.

    When i connect as User same Command works perfectly fine - so it can't be the command which would be for example:

    Get-UnifiedGroup testgrpid|set-unifiedgroup -Alias myNewAlias

    So my simple question - does it work for anyone out there? I have a ticket with ms got kind of stuck - so any help welcome.

    I'm using Powershell Module ExchangeOnlineManagement v 2.0.3 but have tryed 2.0.4 Preview as well  -same behavior.
     



    MCAG CZuellig

    Thursday, December 17, 2020 10:25 PM

Answers