Retrieving Azure AD group members using the Microsoft Graph SDK for PowerShell and the Get-MgGroupMember cmdlet.

PowerShell Code

Note: This code requires the Microsoft Graph SDK for PowerShell.