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 68 forks source link

Additional Reports Since Last Edited #359

Open gsa-hub opened 2 years ago

gsa-hub commented 2 years ago

Additional Reports Since Last Edit Google has made additional audit log reports available to query. This update just adds the new log names to the valid options. No actual functionality is changed in this patch.

To Reproduce Attempt to query a log that is not specified as valid

Error message returned by Google Get-GSActivityReport : Cannot convert argument "applicationName", with value: "groups_enterprise", for "List" to type "Google.Apis.Admin.Reports.reports_v1.ActivitiesResource+ListRequest+ApplicationNameEnum": "Cannot convert value "groups_enterprise" to type "Google.Apis.Admin.Reports.reports_v1.ActivitiesResource+ListRequest+ApplicationNameEnum". Error: "Unable to match the identifier name groups_enterprise to a valid enumerator name. Specify one of the following enumerator names and try again: AccessTransparency, Admin, Calendar, Chat, Drive, Gcp, Gplus, Groups, GroupsEnterprise, Jamboard, Login, Meet, Mobile, Rules, Saml, Token, UserAccounts""

gsa-hub commented 2 years ago

I gave the wrong error message, here is the right one for Get-GSActivityReport:

Get-GSActivityReport : Cannot validate argument on parameter 'ApplicationName'. The argument "groups_enterprise" does not belong to the set "Admin,Calendar,Drive,Groups,GPlus,Login,Mobile,Rules,Token" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again.