---
title: List global orgs
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > Organizations
---

# List global orgs{% #list-global-orgs %}
Copy pageCopied
{% tab title="v2" %}

| Datadog site      | API endpoint                                         |
| ----------------- | ---------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/global_orgs |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/global_orgs |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/global_orgs      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/global_orgs      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v2/global_orgs  |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/global_orgs     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/global_orgs |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/global_orgs |

### Overview

Returns organizations across regions for the authenticated user. The `user_handle` query parameter must match the authenticated user's handle. This endpoint requires the `user_access_read` permission.

OAuth apps require the `user_access_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#organizations) to access this endpoint.



### Arguments

#### Query Strings

| Name                          | Type    | Description                                                                                                                      |
| ----------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------- |
| user_handle [*required*] | string  | The handle of the authenticated user.                                                                                            |
| page[limit]                   | integer | Maximum number of results returned.                                                                                              |
| page[cursor]                  | string  | String to query the next page of results. This key is provided with each valid response from the API in `meta.page.next_cursor`. |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing organizations across regions for the authenticated user.

| Parent field | Field                           | Type     | Description                                                                              |
| ------------ | ------------------------------- | -------- | ---------------------------------------------------------------------------------------- |
|              | data [*required*]          | [object] | Organizations across regions for the authenticated user.                                 |
| data         | attributes [*required*]    | object   | Attributes of an organization associated with the authenticated user.                    |
| attributes   | org [*required*]           | object   | Organization information for a global organization association.                          |
| org          | name [*required*]          | string   | The name of the organization.                                                            |
| org          | public_id                       | string   | The public identifier of the organization.                                               |
| org          | subdomain                       | string   | The subdomain used to access the organization, if configured.                            |
| org          | uuid [*required*]          | uuid     | The UUID of the organization.                                                            |
| attributes   | redirect_url                    | string   | The login URL used to switch into the organization, if available.                        |
| attributes   | source_region [*required*] | string   | The source region of the organization.                                                   |
| attributes   | user [*required*]          | object   | User information for a global organization association.                                  |
| user         | handle [*required*]        | string   | The handle of the user.                                                                  |
| user         | uuid [*required*]          | uuid     | The UUID of the user.                                                                    |
| data         | type [*required*]          | enum     | The resource type for global user organizations. Allowed enum values: `global_user_orgs` |
|              | links                           | object   | Pagination links.                                                                        |
| links        | next                            | string   | Link to the next page.                                                                   |
| links        | prev                            | string   | Link to the previous page.                                                               |
| links        | self                            | string   | Link to the current page.                                                                |
|              | meta                            | object   | Response metadata object.                                                                |
| meta         | page                            | object   | Paging attributes.                                                                       |
| page         | cursor                          | string   | The cursor used to get the current results, if any.                                      |
| page         | limit                           | int32    | Number of results returned.                                                              |
| page         | next_cursor                     | string   | The cursor used to get the next results, if any.                                         |
| page         | prev_cursor                     | string   | The cursor used to get the previous results, if any.                                     |
| page         | type                            | enum     | Type of global orgs pagination. Allowed enum values: `cursor`                            |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": [
    {
      "attributes": {
        "org": {
          "name": "Example Org",
          "public_id": "abcdef12345",
          "subdomain": "example",
          "uuid": "13d10a96-6ff2-49be-be7b-4f56ebb13335"
        },
        "redirect_url": "https://app.datadoghq.com/account/login/password?dd_oid=13d10a96-6ff2-49be-be7b-4f56ebb13335\u0026login_hint=user%40example.com",
        "source_region": "us1.prod.dog",
        "user": {
          "handle": "user@example.com",
          "uuid": "cfab5cf9-5472-48ea-a79c-a64045f4f745"
        }
      },
      "type": "global_user_orgs"
    }
  ],
  "links": {
    "next": "https://app.datadoghq.com/api/v2/global_orgs?user_handle=user@example.com\u0026page[limit]=100\u0026page[cursor]=next-page",
    "prev": "string",
    "self": "https://app.datadoghq.com/api/v2/global_orgs?user_handle=user@example.com\u0026page[limit]=100"
  },
  "meta": {
    "page": {
      "cursor": "",
      "limit": 100,
      "next_cursor": "next-page",
      "prev_cursor": "string",
      "type": "cursor"
    }
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Required query arguments export user_handle="user@example.com" \# Curl command curl -X GET "https://api.datadoghq.com/api/v2/global_orgs?user_handle=${user_handle}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" 
                
##### 

```python
"""
List global orgs returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.organizations_api import OrganizationsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = OrganizationsApi(api_client)
    response = api_instance.list_global_orgs(
        user_handle="user@example.com",
    )

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# List global orgs returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::OrganizationsAPI.new
p api_instance.list_global_orgs("user@example.com")
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// List global orgs returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewOrganizationsApi(apiClient)
	resp, r, err := api.ListGlobalOrgs(ctx, "user@example.com", *datadogV2.NewListGlobalOrgsOptionalParameters())

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.ListGlobalOrgs`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.ListGlobalOrgs`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// List global orgs returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.OrganizationsApi;
import com.datadog.api.client.v2.model.GlobalOrgsResponse;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    OrganizationsApi apiInstance = new OrganizationsApi(defaultClient);

    try {
      GlobalOrgsResponse result = apiInstance.listGlobalOrgs("user@example.com");
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling OrganizationsApi#listGlobalOrgs");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// List global orgs returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_organizations::ListGlobalOrgsOptionalParams;
use datadog_api_client::datadogV2::api_organizations::OrganizationsAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = OrganizationsAPI::with_config(configuration);
    let resp = api
        .list_global_orgs(
            "user@example.com".to_string(),
            ListGlobalOrgsOptionalParams::default(),
        )
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * List global orgs returns "OK" response
 */

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.OrganizationsApi(configuration);

const params: v2.OrganizationsApiListGlobalOrgsRequest = {
  userHandle: "user@example.com",
};

apiInstance
  .listGlobalOrgs(params)
  .then((data: v2.GlobalOrgsResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}
