🖊️ Author: Nairuz Abulhul

🌐 Blog: R3dbuck3t

Table of Contents

Dynamic Groups

A dynamic group is a group type in Microsoft Entra ID (AzureAD) that automatically manages its members based on preset rules. These rules can be based on geographic location, 
department name, user type (member or guest), or any other defined string. Dynamic groups add and remove members automatically based on that specific criteria.

By default, any user can invite guests in Azure AD. If a dynamic group rule allows adding users based on the attributes that a guest user can modify, it will result in the abuse 
of this feature.

Requirements

Installing Az PowerShell

Method #1 Installation via Force Parameter

Install-Module -Name Az -Force 

Method #2 Using Set-PSRepository Cmdlet

Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted

Install-Module -Name Az

Authenticating with Az

Set the execution policy to RemoteSigned to run scripts that we download from the PSGallery.

**Set-ExecutionPolicy RemoteSigned -Force**

Authenticating with an Azure account