SCRT-HQ / PSGSuite

Powershell module for Google / G Suite API calls wrapped in handy functions. Authentication is established using a service account via P12 key to negate the consent popup and allow for greater handsoff automation capabilities
https://psgsuite.io/
Apache License 2.0
235 stars 67 forks source link

[Bug] Get-GSGroup -Where_IsAMember $user returns 400 Bad Request #185

Closed scrthq closed 5 years ago

scrthq commented 5 years ago

Describe the bug Attempting to get the list of groups where a user is a member fails and returns a 400 Bad Request.

To Reproduce

[PS 6.2]> $user = Get-GSUser
[PS 6.2]> Get-GSGroup -Where_IsAMember $user.PrimaryEmail
Get-GSGroup : Exception calling "Execute" with "0" argument(s): "Google.Apis.Requests.RequestError
Bad Request [400]
Errors [
        Message[Bad Request] Location[ - ] Reason[badRequest] Domain[global]
]
"
At line:1 char:1
+ Get-GSGroup -Where_IsAMember $user.PrimaryEmail
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-GSGroup

Expected behavior Should list the groups that the user is a member of.

Environment:

scrthq commented 5 years ago

Resolved in v2.27.0