Skip to content

[ BUG ] Get-FalconAsset -All ==> offset 10000 and limit 100 are invalid #487

Closed

Description

@mpetitb

Describe the bug
The "-All" parameter is very useful most of the time, as it allows to retrieve all the objects with a single call. However, using the "Get-FalconAsset -All", the output is as follows :

Write-Result: C:\Users\myuser\Documents\PowerShell\Modules\PSFalcon\2.2.7\private\Private.ps1:687
Line |
 687 |          Write-Result $Object
     |          ~~~~~~~~~~~~~~~~~~~~
     | {"code":400,"message":"offset 10000 and limit 100 are invalid; offset + limit must be less than or equal to 10000"}

The same command with the "-Detailed" flag works as expected :

PS C:\Users\myuser> $assets = Get-FalconAsset -All -Detailed
PS C:\Users\myuser> $assets.count
33398

To Reproduce
1 - You might need to have more than 10001 assets in your environment
2 - Execute "Get-FalconAsset -All"

Expected behavior
Command executes without pagination/offset issues

Environment (please complete the following information):

  • OS: Windows 11
  • PowerShell: 7.4.11
  • PSFalcon: 2.2.7 (but also happens in 2.2.9)

Additional context
You might need to have more than 10001 assets in your environment

Activity

  1. added
    bug
    on Sep 16, 2025
  2. added
    question
    and removed
    bug
    on Sep 17, 2025
  3. bk-cs commented on Sep 17, 2025

    @bk-cs
    Contributor

    The majority of the CrowdStrike APIs are limited to 10,000 total results returned, even if there are more than 10,000 results listed in the pagination.total (i.e. what you see when you use -Total). The error you provided is consistent with a typical CrowdStrike API and is an expected result.

    The -All parameter in PSFalcon is designed to continue to supply pagination information to the relevant API until either all results are returned, or the API stops producing results.

    There are specific APIs that allow more than 10,000 results to be returned. In the case of Get-FalconAsset, both types of APIs are used:

    • Get-FalconAsset -All uses GET /discover/queries/hosts/v1 which is limited to 10,000 results
    • Get-FalconAsset -Detailed -All uses GET /discover/combined/hosts/v1 which is not limited to 10,000 results

    When using an API that is limited to 10,000 results, you must use Filter to group large result sets into <10,000 results and retrieve each group to reach the total count.

  4. locked and limited conversation to collaborators on Sep 17, 2025
  5. converted this issue into a discussion #491 on Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

question

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions