> This page is for Developers.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://zuora.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://zuora.ferndocs.com/_mcp/server.

# List groups

GET https://rest.test.zuora.com/scim/v2/Groups

Returns a paginated list of groups, ten groups per page by default. Use the startIndex and count (max 100) query parameters to paginate long lists of groups. It's possible to return a list of specific types of groups using the filter parameter.

Reference: https://zuora.ferndocs.com/developers/api-reference/zuora-api/oneid/scim/get-list-groups

## Authentication

- `Authorization` header (bearer token, required) — Use `Bearer {{token}}` in the `Authorization` header for authentication.

## Servers

- `https://rest.test.zuora.com` (US Developer & Central Sandbox (incl. Test Drive), default)
- `https://rest.sandbox.na.zuora.com` (US API Sandbox Cloud 1)
- `https://rest.apisandbox.zuora.com` (US API Sandbox Cloud 2)
- `https://rest.na.zuora.com` (US Production Cloud 1)
- `https://rest.zuora.com` (US Production Cloud 2)
- `https://rest.test.eu.zuora.com` (EU Developer & Central Sandbox)
- `https://rest.sandbox.eu.zuora.com` (EU API Sandbox)
- `https://rest.eu.zuora.com` (EU Production)
- `https://rest.test.ap.zuora.com` (APAC Developer & Central Sandbox)
- `https://rest.ap.zuora.com` (APAC Production)

## Request

### Query parameters

- `count` (integer, optional) — The number of records returned per page in the response.
- `filter` (string, optional) — The filter used to filter the group, either by organization id.
- `startIndex` (integer, optional) — The index number of the page that you want to retrieve. You must set count before specifying startIndex. For example, if you set count to 20 and startIndex to 2, the 21st to 40th records are returned in the response.

## Response

### 200

OK

- `schemas` (list of string, optional)
- `id` (string, optional, nullable)
- `externalId` (string, optional, nullable)
- `meta` (ScimV2GroupsGetResponsesContentApplicationJsonSchemaMeta, optional, nullable)
- `totalResults` (integer, optional) — Total numbers of groups present.
- `resources` (list of ScimV2GroupsGetResponsesContentApplicationJsonSchemaResourcesItems, optional)

## Errors

### 401 Unauthorized Error

Unauthorized

- `success` (boolean, optional) — Indicates whether the call succeeded.
- `reasons` (list of ScimV2GroupsGetResponsesContentApplicationJsonSchemaReasonsItems, optional)

### 403 Forbidden Error

Forbidden

- `timestamp` (string, optional) — The timestamp when the response was generated.
- `status` (string, optional) — Indicates whether the call succeeded.
- `error` (string, optional) — A brief description of the error that occurred.
- `message` (string, optional) — A detailed message providing additional context about the error or issue. This can be used for debugging or informational purposes.
- `path` (string, optional) — The API endpoint path that was accessed when the error occurred. This helps to identify which part of the API was involved.

### 404 Not Found Error

Not Found

- `schemas` (list of string, optional) — List of schema identifiers that define the format of the group resource.
- `status` (string, optional) — The HTTP status code indicating the error type.
- `detail` (string, optional) — A brief explanation of the error, providing context about the resource issue.

## Types

### ScimV2GroupsGetResponsesContentApplicationJsonSchemaMeta

### ScimV2GroupsGetResponsesContentApplicationJsonSchemaResourcesItems

- `schemas` (list of string, optional)
- `id` (string, optional)
- `displayName` (string, optional)
- `members` (list of ScimV2GroupsGetResponsesContentApplicationJsonSchemaResourcesItemsMembersItems, optional)
- `urn:zuora:scim:schemas:1.0:GroupExtension` (ScimV2GroupsGetResponsesContentApplicationJsonSchemaResourcesItemsUrnZuoraScimSchemas10GroupExtension, optional)
- `meta` (ScimV2GroupsGetResponsesContentApplicationJsonSchemaResourcesItemsMeta, optional, nullable)

### ScimV2GroupsGetResponsesContentApplicationJsonSchemaReasonsItems

- `message` (string, optional)
- `code` (string, optional)

### ScimV2GroupsGetResponsesContentApplicationJsonSchemaResourcesItemsMembersItems

- `value` (string, optional)

### ScimV2GroupsGetResponsesContentApplicationJsonSchemaResourcesItemsUrnZuoraScimSchemas10GroupExtension

- `schemas` (list of string, optional)
- `description` (string, optional)
- `organizationId` (string, optional)
- `active` (boolean, optional)

### ScimV2GroupsGetResponsesContentApplicationJsonSchemaResourcesItemsMeta

- `resourceType` (string, optional)
- `location` (string, optional)

## Examples

**Response**

```json
{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:ListResponse"
  ],
  "id": null,
  "externalId": null,
  "meta": null,
  "totalResults": 28,
  "resources": [
    {
      "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:Group",
        "urn:zuora:scim:schemas:1.0:GroupExtension"
      ],
      "id": "01b496f7-1988-44aa-9ea6-c27f0288fa9d",
      "displayName": "Test_GroupName",
      "members": [
        {
          "value": "e1b624ac-e00f-422b-b4da-20070901b22f"
        }
      ],
      "urn:zuora:scim:schemas:1.0:GroupExtension": {
        "schemas": [
          "urn:zuora:scim:schemas:1.0:GroupExtension"
        ],
        "description": "Test_GroupDescription",
        "organizationId": "5619df2e-fa8c-47fa-9c1e-16ab5af4936e",
        "active": true
      },
      "meta": {
        "resourceType": "Group",
        "location": "http://localhost:9900/scim/v2/Groups/01b496f7-1988-44aa-9ea6-c27f0288fa9d"
      }
    }
  ]
}
```

**SDK Code**

```python SCIM_getListGroups_example
import requests

url = "https://rest.test.zuora.com/scim/v2/Groups"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript SCIM_getListGroups_example
const url = 'https://rest.test.zuora.com/scim/v2/Groups';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go SCIM_getListGroups_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://rest.test.zuora.com/scim/v2/Groups"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby SCIM_getListGroups_example
require 'uri'
require 'net/http'

url = URI("https://rest.test.zuora.com/scim/v2/Groups")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java SCIM_getListGroups_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://rest.test.zuora.com/scim/v2/Groups")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php SCIM_getListGroups_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://rest.test.zuora.com/scim/v2/Groups', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp SCIM_getListGroups_example
using RestSharp;

var client = new RestClient("https://rest.test.zuora.com/scim/v2/Groups");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift SCIM_getListGroups_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://rest.test.zuora.com/scim/v2/Groups")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```