Issue with Paging in Search All Organizations API

Hello Grafana Community,

I encountered an issue while working with the Search All Organizations API. Here’s the problem I’m facing:

When I use the API without any paging, it correctly returns all organization IDs and names. I used the following API call:

GET http://admin:admin@localhost:3000/api/orgs

The response is as expected, showing all organizations.

However, when I try to use paging with the same API, it returns an empty list. I used the following API call:

GET http://admin:admin@localhost:3000/api/orgs?perpage=10&page=1

Instead of a paginated response with a list of organizations, I receive an empty array.