Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
scrthq opened this issue May 14, 2019 · 1 comment
Closed

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

scrthq opened this issue May 14, 2019 · 1 comment
Assignees
Labels

Comments

@scrthq
Copy link
Member

scrthq commented May 14, 2019

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:

  • OS: Windows 10
  • PowerShell Version: Core 6.2 and WinPS 5.1
  • PSGSuite Version: 2.26.4
@scrthq scrthq self-assigned this May 14, 2019
@scrthq scrthq added the bug label May 14, 2019
scrthq added a commit that referenced this issue May 15, 2019
scrthq added a commit that referenced this issue May 15, 2019
## 2.27.0

* [Issue #185](#185)
  * Fixed: `Get-GSGroup -Where_IsAMember $member` no longer errors.
* [Issue #186](#186)
  * Added: `Test-GSGroupMembership` to map to the [hasMember method](https://developers.google.com/admin-sdk/directory/v1/reference/members/hasMember).
* Miscellaneous
  * Improved build process to auto-update NuGet dependencies.
  * Added new private function `Resolve-Email` to convert a name-part or the case-sensitive `me` to the full email address accordingly.
@scrthq
Copy link
Member Author

scrthq commented May 15, 2019

Resolved in v2.27.0

@scrthq scrthq closed this as completed May 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant