How can I get the specific Dynamic Group membership using the latest Get-MgGroup cmdlet ?
The article does not mention how to do it using the latest cmdlet: https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.groups/get-mggroup?view=graph-powershell-1.0
PS C:\WINDOWS\system32> Get-MgGroup -Filter "GroupTypes -eq 'DynamicMembership'"
Get-MgGroup : Invalid filter clause: Syntax error at position 12 in 'GroupTypes -eq 'DynamicMembership''.
Status: 400 (BadRequest)
ErrorCode: BadRequest
Date: 2023-07-19T07:10:20
Headers:
Transfer-Encoding : chunked
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
Date : Wed, 19 Jul 2023 07:10:19 GMT
At line:1 char:1
+ Get-MgGroup -Filter "GroupTypes -eq 'DynamicMembership'"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: ({ ConsistencyLe...ndProperty = }:<>f__AnonymousType84`9) [Get-MgGroup_List], Exception
+ FullyQualifiedErrorId : BadRequest,Microsoft.Graph.PowerShell.Cmdlets.GetMgGroup_List