Hi Folks,
I am unable to get and retrieve the Unified groups using the Microsoft Graph powershell simple command like the below:
Connect-MgGraph -Scopes Group.Read.All, GroupMember.Read.All, User.Read.All, Files.Read.All
Get-MgGroup -Filter "groupTypes/any(c:c eq 'Unified')" -All
I got this error despite I am the Global Administrator of the company.
Connect-MgGraph : The type initializer for 'Azure.Identity.AuthenticationRecord' threw an exception.
At line:49 char:1
+ Connect-MgGraph -Scopes Group.Read.All, GroupMember.Read.All, User.Re ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Connect-MgGraph], TypeInitializationException
+ FullyQualifiedErrorId : Microsoft.Graph.PowerShell.Authentication.Cmdlets.ConnectMgGraph
Get-MgGroup : Authentication needed. Please call Connect-MgGraph.
At line:52 char:1
+ $unifiedGroups = Get-MgGroup -Filter "groupTypes/any(c:c eq 'Unified' ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-MgGroup_List], AuthenticationException
+ FullyQualifiedErrorId : Microsoft.Graph.PowerShell.Cmdlets.GetMgGroup_List