CrowdStrike / psfalcon

PowerShell for CrowdStrike's OAuth2 APIs
The Unlicense
350 stars 66 forks source link

[ BUG ] `Get-FalconZta` returns 0 results for CID aggregate data #416

Closed kdcalex closed 1 month ago

kdcalex commented 1 month ago

Describe the bug Running the PSFalcon Get-FalconZta command from a Parent API key, Parent API key with member_cid defined, or from a child API key fails to return any results.

To Reproduce Attempt to run the command Get-FalconZta and it will return 0 results

Expected behavior I expect the audit aggregate data for the CID for ZTA scores showing percentages of applied assessments across the board for helping to improve our overall ZTA scores.

Environment (please complete the following information):

Transcript content

PS C:\WINDOWS\system32> Show-FalconModule

PSVersion      : Desktop [5.1.19041.4522]
ModuleVersion  : v2.2.2 {d893eb9f-f6bb-4a40-9caf-aaff0e42acd1}
ModulePath     : C:\Users\********\OneDrive - DOJ\Documents\WindowsPowerShell\Modules\PSFalcon\2.2.2
UserModulePath : C:\Users\********\OneDrive - DOJ\Documents\WindowsPowerShell\Modules;C:\Program
                 Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
UserHome       : C:\Users\********
UserAgent      : crowdstrike-psfalcon/2.2.2

PS C:\WINDOWS\system32> Get-FalconZta
PS C:\WINDOWS\system32> Stop-Transcript
bk-cs commented 1 month ago

Thanks for your report! Your PSFalcon module is very out of date. Can you try uninstalling and installing the latest version?

Uninstall-Module -Name PSFalcon -AllVersions
Install-Module -Name PSFalcon -Scope CurrentUser

Once complete, please re-import and retry your command:

Import-Module -Name PSFalcon
Request-FalconToken ...
Get-FalconZta
kdcalex commented 1 month ago

Thanks, that worked.