MSIdentityTools icon indicating copy to clipboard operation
MSIdentityTools copied to clipboard

bug with scope filter of mggraph?

Open tikesavage opened this issue 2 years ago • 2 comments

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

tikesavage avatar Nov 02 '23 19:11 tikesavage

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.

tikesavage avatar Nov 03 '23 02:11 tikesavage

uninstalled and reinatlled graph and this module. on PS5 and PS7. still broke

tikesavage avatar Nov 06 '23 17:11 tikesavage

Closing thiat as the v2 group writeback is deprecated now.

merill avatar Jul 18 '24 05:07 merill