Error while provisioning Microsoft 365 group

We are trying to provision Microsoft 365 groups, but the tool is returning the following error to us:

Request failed with Forbidden status code (Forbidden). {"error":{"code":"AppOnlyAccessNotEnabledForTarget","message":"App Only access is not allowed for target resource: 'xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx'.","innerError":{"date":"2023-06-30T19:10:40","request-id":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","client-request-id":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}}}

Has anyone faced this error before and have some sort of guidance on how to solve it?

Thanks!

  •  ,

    Thanks for posting in the On Demand forum. I understand that you are experiencing issues provisioning M365 groups using On Demand Migration (ODM). Just to confirm, are you trying to provision these M365 groups in the ODM Teams module? Based on your reference to "Provision" I will assume you are, which is the correct way forward. 

    Given the error you are experiencing, I would suggest going to the ODM Portal | Tenants | source tenant | Edit Consents and regranting consent to each permission under the Migration heading, especially the Teams permission. Once this is complete for the source tenant, I would suggest editing the consents for the target tenant and regranting consents there too.

    Wait 15 minutes, then try provisioning the M365 groups again. Let me know if this resolves the issue you are experiencing.

    Regards, 

    Trevor Taegder
    Senior Technical Support Engineer
    Quest | Support

  • Hi Trevor, thanks a lot for your quick response. We are going to try this you suggested and I'll keep you posted.

    Regards,

    Thadeu