bug with scope filter of mggraph?
Describe the bug
cmdlet or module not seeing the scopes when connect to mg graph
PSVersion 5.1.14393.2189 module versions tested : 2.0.16 2.0.45
Code and Error.
Connect-MgGraph -Scopes "Directory.ReadWrite.All, Group.ReadWrite.All"
Get-mggroup -filter "groupTypes/any(c:c eq 'Unified')" | Get-MsIdGroupWritebackConfiguration
Get-MsIdGroupWritebackConfiguration : Additional scope needed, call Connect-MgGraph with one of the following scope Directory.Read.All, Directory.ReadWrite.All, Group.Read.All, Group.ReadWrite.All, GroupMember.Read.All At line:1 char:58
- ... oupTypes/any(c:c eq 'Unified')" | Get-MsIdGroupWritebackConfiguration
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
- FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-MsIdGroupWritebackConfiguration
uninstalled and reinstalled all ms graph modules. and this module. different error but still not working
These cmdlet work on their own. get-mgGroup -GroupId "3f5e595e-32f0-4114-8483-c5241eb9f18a" Get-mggroup -filter "groupTypes/any(c:c eq 'Unified')" Find-MgGraphCommand -command Get-Mggroup
both examples here errors
Get-MsIdGroupWritebackConfiguration -GroupId "3f5e595e-32f0-4114-8483-c5241eb9f18a"
Get-mggroup -filter "groupTypes/any(c:c eq 'Unified')" | Get-MsIdGroupWritebackConfiguration Find-MgGraphCommand: 'Get- MgGroup' is not a valid Microsoft Graph PowerShell command. Please check the name and try again. InvalidOperation: Cannot index into a null array. PropertyNotFoundException: The property 'Count' cannot be found on this object. Verify that the property exists. PropertyNotFoundException: The property 'Command' cannot be found on this object. Verify that the property exists.
uninstalled and reinatlled graph and this module. on PS5 and PS7. still broke
Closing thiat as the v2 group writeback is deprecated now.