Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Submit-PnPSearchQuery returns inconsistent data #4730

Open
1 of 6 tasks
AsierAndres opened this issue Feb 7, 2025 · 0 comments
Open
1 of 6 tasks

[BUG] Submit-PnPSearchQuery returns inconsistent data #4730

AsierAndres opened this issue Feb 7, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@AsierAndres
Copy link

Reporting an Issue

I've tried running the same query once and again with Submit-PnPSearchQuery, and the number of results returned by the command varies from 400 on the worst cases to 56.000 when I'm lucky. The amount of items at my tenant that meet the query criteria has always been around the aforementioned 56.000 items. So, the amount of results of the query should have always been around that number.

Expected behavior

The Submit-PnPSearchQuery command should always return the same amount of results if there are no changes on the items that meet the search criteria.

Actual behavior

Every time I run the Submit-PnPSearchQuery comand I receive a different amount of result with no logic at all. I sometimes receive 400 items, run the same query again and receive 56.000, and after a couple minutes it returns 30.000 results.

Steps to reproduce behavior

I've tried it with different app registrations, on different computers and in different days, but the behavior is always the same.

Connect-PnPOnline -Url $adminCenterURL -ClientID $client -CertificateBase64Encoded $cert -Tenant $tenant

$sites = Submit-PnPSearchQuery -Query "RefinableString80:Yes" -All -TrimDuplicates $False

Write-host "Sites retrieved: $($sites.ResultRows.count)"

What is the version of the Cmdlet module you are running?

2.12.0

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify
@AsierAndres AsierAndres added the bug Something isn't working label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant