# List scopes (/docs/apis/management/resources/GetAllScopes)

`GET /resources/scopes`

Retrieves a paginated list of identity scopes. Optional query parameters allow searching, filtering, and sorting the results.

Base URL: `https://{tenant}.{region}.monocloud.com/api`, where `{tenant}`, `{region}` (one of us, eu, in) come from your tenant. Authentication: send your Management API key in the `X-API-KEY` header.

## Parameters

- `page` (query) (integer, int32, default 1) The page number to retrieve.
- `size` (query) (integer, int32, default 10) The number of resources to return per page.
- `filter` (query) (string) Optional Lucene-style filter expression used to search by attributes.
- `sort` (query) (string) Sort expression in the format `field:direction`, where direction is `1` for ascending or `-1` for descending. Supported fields include - `name`, `display_name`, and `creation_time`

## Response body

`200`, JSON. The scopes were retrieved successfully

Returns `Scope[]`. Each item has these fields:

- `id` (string, required) The unique identifier of the resource.
- `display_name` (string) Human-readable display name for the resource.
- `description` (string) Description that explains the purpose of the resource.
- `show_in_discovery_document` (boolean, required) Indicates whether this resource is advertised via the discovery document.
- `creation_time` (integer, required, date-time) Specifies the creation time of the resource (in Epoch).
- `last_updated` (integer, required, date-time) Specifies the last update time of the resource (in Epoch).
- `name` (string, required) The unique name of the scope. This is the value a client will use for the scope parameter in the authorize request.
- `required` (boolean, required) Specifies whether the scope is mandatory and cannot be de-selected by the user on the consent screen.
- `emphasize` (boolean, required) Indicates whether this scope is visually emphasized on the consent screen, typically for sensitive or high-impact permissions.
- `is_default` (boolean, required) Indicates whether this is a built-in identity scope provided by the platform.
- `user_claims` (ScopeClaim[], required) List of user claim types that will be embedded into identity tokens and/or returned from the `UserInfo` endpoint when this scope is granted.
  - `claim` (string, required) The name of the user claim granted by this scope.
  - `include_in_identity_token` (boolean, required) Indicates whether this claim is included in the issued ID token when the scope is granted.
  - `include_in_user_info` (boolean, required) Indicates whether this claim is returned by the `UserInfo` endpoint when the scope is granted.

## Errors

- `401` Unauthorized
- `403` Forbidden

## Example (MonoCloud .NET SDK)

```csharp
using MonoCloud.Management;
using MonoCloud.Management.Core.Base;

var apiClient = new MonoCloudManagementClient(new MonoCloudConfig("<your-domain>", "[[API-Key]]"));


var page = 1;

var size = 10;

var filter = "api";

var sort = "creation_time:1";


var result = await apiClient.Resources.GetAllScopesAsync(page, size, filter, sort);
```

## Example (MonoCloud Javascript SDK)

```javascript
import { MonoCloudManagementClient } from '@monocloud/management';

const apiClient = MonoCloudManagementClient.init({ domain: '<your-domain>', apiKey: '[[API-Key]]' });

const page = 1;

const size = 10;

const filter = 'api';

const sort = 'creation_time:1';

const result = apiClient.resources.getAllScopes(page, size, filter, sort);
```