Share via

Create dynamic office group using script

Srbh_TheComputerGuy 101 Reputation points
2021-11-29T08:32:03.387+00:00

I am fairly new to Azure dynamic groups and I've been asked if we can create O365 groups in Exchange Online, using the New-UnifiedGroup and Set-UnifiedGroup cmdlets also the group should be dynamic, based upon "Managers direct reportee" criteria. The script should prompt for manager's employee ID and then use it to fetch their direct reportees. Is this even possible? or do I skip Exchange Online entirely, and in Azure use the New-AzureADMSGroup cmdlets to create a dynamic group.

Any help is appreciated. Thanks.

Microsoft Security | Microsoft Entra | Microsoft Entra ID

1 answer

Sort by: Most helpful
  1. Vasil Michev 127K Reputation points MVP Volunteer Moderator
    2021-11-29T09:46:39.883+00:00

    You cannot create dynamic M365 Groups via the New-UnifiedGroup cmdlet, use New-AzureADMSGroup or the Graph API directly.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.