SCRT-HQ/PSGSuite

Inconsistent Get-GSUser "IsEnrolledIn2Sv" field results when multiple users are returned

jboiselle opened this issue · 1 comments

Describe the bug
When using Get-GSUser to query more than one user, the IsEnrolledIn2Sv field is sometimes inaccurate. If Get-GSUser is used to return a single user, the IsEnrolledIn2Sv field is always accurate.

As far as I can tell in my own testing, only the IsEnrolledIn2Sv field seems to be affected.

To Reproduce
Run Get-GSUser in such a way that it returns multiple users, whether using -Filter, -SearchBase, etc:

PS > $googleUsers = Get-GSUser -Filter "isEnrolledIn2Sv=true"
PS > $googleUsers | ? {$_.User -eq 'user@issue.test'} | Select IsEnrolledIn2Sv

IsEnrolledIn2Sv
---------------
          False

Run Get-GSUser in such a way that it returns a single user:

PS > $googleUsers = Get-GSUser 'user@issue.test'
PS > $googleUsers | ? {$_.User -eq 'user@issue.test'} | Select IsEnrolledIn2Sv

IsEnrolledIn2Sv
---------------
           True

Expected behavior
The IsEnrolledIn2Sv field should be consistent for each user regardless of returning a single user or multiple users.

Environment
Tested on 3 different devices with the same results.

  • OS: Windows Server 2012 R2
  • PowerShell Version: 5.1.14409.1018
  • PSGSuite Version: 2.36.4
     
  • OS: Windows Server 2019
  • PowerShell Version: 5.1.17763.2183
  • PSGSuite Version: 2.36.4
     
  • OS: Windows 10 20H2
  • PowerShell Version: 5.1.19041.1320
  • PSGSuite Version: 2.36.4

Tested this directly against Google's Directory API and saw the same issue. The users.list method returns different results than users.get. Will proceed to open a support case with them.