Hello,
I am trying to figure out what is the best way to get a list of Azure Active Directory AD users/groups from Powershell.
I've found three different ways to do it:
Get-ADGroup: this cmdlet is part of the "Active Directory module for Windows PowerShell", for "Windows Server 2022 PowerShell". Link here.
Get-AzureADGroup: this cmdlet is part of the "Azure Active Directory PowerShell for Graph" module. This is a module for the "Azure Active Directory Powershell 2.0". Link here.
Get-MgGroup: this cmdlet is part of the "Microsoft.Graph.Groups module, for the "Microsoft Graph PowerShell v1.0". Link here.
Option 1: is the option used on my script; however, I can't understand if this module is using "Azure AD graph" (which apparently is being deprecated) or if it's using Microsoft Graph.
Option 2: I am fairly sure is using Active Directory graph, which is being deprecated.
Option 3: no idea if I should be using this.
Any insights would be greatly appreciated.
Thank you.