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
234 stars 67 forks source link

Get-GSUserLicense does not return result unless -CheckAll is being specified #306

Open jgeron-suhsd opened 3 years ago

jgeron-suhsd commented 3 years ago

Description of Bug If running Get-GSUserLicense -User user@domain.org no response is given, even if the user has a license assigned.

If using Get-GSUserLicense -User user@domain.org -CheckAll I'll get a response.

When running the commands with -Verbose I can see that without -CheckAll, it's stopping after it evaluates "G-Suite-Enterprise-for-Education". If I run with -CheckAll, it will give me the license info and continue on evaluating the rest of the licenses.

I can't say if this happens on other license types, but it does on Enterprise for Education and Enterprise for Education Student.

To Reproduce Steps to reproduce the behavior:

  1. Run Get-GSUserLicense against a user who has a license, won't get a license returned
  2. Run Get-GSUserLicense -CheckAll against same user and you'll get a license.

Expected behavior Command should return an assigned license object with license information

Environment (please complete the following information):