Creating Groups

Objective

Create groups in Azure Active Directory
  • Statically assigned groups
  • Dynamically assigned groups
  • Groups using CLI and PowerShell

Process

From the Azure Active Directory click create new group
  • Fill out the information

Azure CLI

az ad group create --display-name --mail-nickname [--description] [--force {false, true}]
Still limited on options you can use to create groups
Example: create a static assigned group named “Static Test Group”
az ad group create --display-name 'Static Test Group' --mail-nickname Static --description "Static group made for testing purposes"

PowerShell

Connect-AzureAD
New-AzureADGroup [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-Description <String>] -DisplayName <String> -MailEnabled <Boolean> -MailNickName <String> -SecurityEnabled <Boolean> [<CommonParameters>]
More Feature Rich cmdlet New-AzureADMSGroup
New-AzureADMSGroup [-Description <String>] -DisplayName <String> [-IsAssignableToRole <Boolean>] -MailEnabled <Boolean> -MailNickname <String> -SecurityEnabled <Boolean> [-GroupTypes <System.Collections.Generic.List`1[System.String]>] [-Visibility <String>] [<CommonParameters>]
Example: Create a group named “Dynamic Test Group”
Can’t create groups as dynamic currently so we will set it to dynamic after manually
New-AzureADMSGroup -DisplayName "Dynamic Test Group" -MailEnabled $false -SecurityEnabled $true -MailNickName 'NotSet'

Dynamic Assignment

Change membership type to Dynamic User/Device
notion image
Configure rules to have users/devices dynamically assigned to the group
notion image

Conclusion

A static group was created and we can add users into the group manually
notion image
A dynamic group was created and we set the group to add anyone with ‘bui’ in the display name
notion image