> ## Documentation Index
> Fetch the complete documentation index at: https://auth0.generaltranslation.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Récupérer des Organisations

> Apprenez à récupérer des Organisations en utilisant l’Auth0 Dashboard et Management API.

export const AuthCodeGroup = ({children, dropdown}) => {
  const [processedChildren, setProcessedChildren] = useState(children);
  useEffect(() => {
    let unsubscribe = null;
    function init() {
      unsubscribe = window.autorun(() => {
        const processChildren = node => {
          if (typeof node === "string") {
            let processedNode = node;
            for (const [key, value] of window.rootStore.variableStore.values.entries()) {
              processedNode = processedNode.replace(new RegExp(key, "g"), value);
            }
            return processedNode;
          } else if (Array.isArray(node)) {
            return node.map(processChildren);
          } else if (node && node.props && node.props.children) {
            return {
              ...node,
              props: {
                ...node.props,
                children: processChildren(node.props.children)
              }
            };
          }
          return node;
        };
        setProcessedChildren(processChildren(children));
      });
    }
    if (window.rootStore) {
      init();
    } else {
      window.addEventListener("adu:storeReady", init);
    }
    return () => {
      window.removeEventListener("adu:storeReady", init);
      unsubscribe?.();
    };
  }, [children]);
  return <CodeGroup dropdown={dropdown}>{processedChildren}</CodeGroup>;
};

export const AuthCodeBlock = ({filename, icon, language, highlight, children}) => {
  const [processedChildren, setProcessedChildren] = useState(children);
  useEffect(() => {
    let unsubscribe = null;
    function init() {
      unsubscribe = window.autorun(() => {
        let processedChildren = children;
        for (const [key, value] of window.rootStore.variableStore.values.entries()) {
          processedChildren = processedChildren.replace(new RegExp(key, "g"), value);
        }
        setProcessedChildren(processedChildren);
      });
    }
    if (window.rootStore) {
      init();
    } else {
      window.addEventListener("adu:storeReady", init);
    }
    return () => {
      window.removeEventListener("adu:storeReady", init);
      unsubscribe?.();
    };
  }, [children]);
  return <CodeBlock filename={filename} icon={icon} language={language} lines highlight={highlight}>
      {processedChildren}
    </CodeBlock>;
};

Lorsque vous travaillez avec [organizations](/docs/fr-CA/fr-ca/manage-users/organizations/organizations-overview) de manière programmatique, vous pouvez avoir besoin de récupérer soit une liste de toutes les organisations, soit des organisations individuellement par nom ou par ID.

<Warning>
  Vous ne devez accéder à Management API qu’à l’aide d’un client confidentiel. Son utilisation est soumise aux [limites anti-attaques de Management API Auth0](/docs/fr-CA/fr-ca/troubleshoot/customer-support/operational-policies/rate-limit-policy/management-api-endpoint-rate-limits).
</Warning>

<div id="retrieve-tenant-organizations">
  ## Récupérer les organisations d’un locataire
</div>

Vous pouvez récupérer toutes les organisations d’un locataire via <Tooltip href="/docs/fr-CA/fr-ca/glossary?term=management-api" tip="Management API
Un produit permettant aux clients d’effectuer des tâches administratives." cta="Voir le glossaire">Management API</Tooltip>.

<Warning>
  Pour récupérer plus de 1000 résultats, vous devez utiliser la méthode de pagination par points de contrôle. Pour en savoir plus, consultez [Obtenir le point de terminaison de l’organisation](/docs/fr-CA/fr-ca/api/management/v2#!/Organizations/get_organizations) dans notre API Explorer.
</Warning>

Effectuez un appel `GET` au point de terminaison`Get Organizations`. Veillez à remplacer la valeur de remplacement `MGMT_API_ACCESS_TOKEN` par votre jeton d’accès au Management API.

<AuthCodeGroup>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://{yourDomain}/api/v2/organizations' \
    --header 'authorization: Bearer MGMT_API_ACCESS_TOKEN'
  ```

  ```csharp C# theme={null}
  var client = new RestClient("https://{yourDomain}/api/v2/organizations");
  var request = new RestRequest(Method.GET);
  request.AddHeader("authorization", "Bearer MGMT_API_ACCESS_TOKEN");
  IRestResponse response = client.Execute(request);
  ```

  ```go Go theme={null}
  package main

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

  func main() {

  	url := "https://{yourDomain}/api/v2/organizations"

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

  	req.Header.Add("authorization", "Bearer MGMT_API_ACCESS_TOKEN")

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

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

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

  }
  ```

  ```java Java theme={null}
  HttpResponse<String> response = Unirest.get("https://{yourDomain}/api/v2/organizations")
    .header("authorization", "Bearer MGMT_API_ACCESS_TOKEN")
    .asString();
  ```

  ```javascript Node.JS theme={null}
  var axios = require("axios").default;

  var options = {
    method: 'GET',
    url: 'https://{yourDomain}/api/v2/organizations',
    headers: {authorization: 'Bearer MGMT_API_ACCESS_TOKEN'}
  };

  axios.request(options).then(function (response) {
    console.log(response.data);
  }).catch(function (error) {
    console.error(error);
  });
  ```

  ```objc Obj-C theme={null}
  #import <Foundation/Foundation.h>

  NSDictionary *headers = @{ @"authorization": @"Bearer MGMT_API_ACCESS_TOKEN" };

  NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://{yourDomain}/api/v2/organizations"]
                                                         cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                     timeoutInterval:10.0];
  [request setHTTPMethod:@"GET"];
  [request setAllHTTPHeaderFields:headers];

  NSURLSession *session = [NSURLSession sharedSession];
  NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                              completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                  if (error) {
                                                      NSLog(@"%@", error);
                                                  } else {
                                                      NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                      NSLog(@"%@", httpResponse);
                                                  }
                                              }];
  [dataTask resume];
  ```

  ```php PHP theme={null}
  $curl = curl_init();

  curl_setopt_array($curl, [
    CURLOPT_URL => "https://{yourDomain}/api/v2/organizations",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => [
      "authorization: Bearer MGMT_API_ACCESS_TOKEN"
    ],
  ]);

  $response = curl_exec($curl);
  $err = curl_error($curl);

  curl_close($curl);

  if ($err) {
    echo "cURL Error #:" . $err;
  } else {
    echo $response;
  }
  ```

  ```python Python theme={null}
  import http.client

  conn = http.client.HTTPSConnection("")

  headers = { 'authorization': "Bearer MGMT_API_ACCESS_TOKEN" }

  conn.request("GET", "/{yourDomain}/api/v2/organizations", headers=headers)

  res = conn.getresponse()
  data = res.read()

  print(data.decode("utf-8"))
  ```

  ```ruby Ruby theme={null}
  require 'uri'
  require 'net/http'
  require 'openssl'

  url = URI("https://{yourDomain}/api/v2/organizations")

  http = Net::HTTP.new(url.host, url.port)
  http.use_ssl = true
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE

  request = Net::HTTP::Get.new(url)
  request["authorization"] = 'Bearer MGMT_API_ACCESS_TOKEN'

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

  ```swift Swift theme={null}
  import Foundation

  let headers = ["authorization": "Bearer MGMT_API_ACCESS_TOKEN"]

  let request = NSMutableURLRequest(url: NSURL(string: "https://{yourDomain}/api/v2/organizations")! 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)
    } else {
      let httpResponse = response as? HTTPURLResponse
      print(httpResponse)
    }
  })

  dataTask.resume()
  ```
</AuthCodeGroup>

<Callout icon="file-lines" color="#0EA5E9" iconType="regular">
  **Trouvez votre domaine Auth0**

  Si votre domaine Auth0 est le nom de votre locataire, votre sous-domaine régional (sauf si votre locataire se trouve aux États-Unis et a été créé avant juin 2020), est `.auth0.com`. Par exemple, si votre nom de locataire est `travel0`, votre nom de domaine Auth0 sera `travel0.us.auth0.com`. (Si votre locataire est aux États-Unis et qu’il a été créé avant juin 2020, votre nom de domaine Auth0 sera `https://travel0.auth0.com`.)

  Si vous utilisez des domaines personnalisés, votre domaine est le nom de votre domaine personnalisé.
</Callout>

<table class="table">
  <thead>
    <tr>
      <th>Valeur</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`MGMT_API_ACCESS_TOKEN`</td>
      <td><a href="/docs/fr-CA/fr-ca/tokens/management-api-access-tokens">Jeton d’accès à Management API</a> avec la permission `read:organizations`.</td>
    </tr>
  </tbody>
</table>

<div id="response-status-codes">
  ### Codes d’état des réponses
</div>

Les codes d’état de réponse possibles sont les suivants :

<table class="table">
  <thead>
    <tr>
      <th>Code d’état</th>
      <th>Code d’erreur</th>
      <th>Message</th>
      <th>Cause</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`200`</td>

      <td />

      <td>Organisations récupérées avec succès.</td>

      <td />
    </tr>

    <tr>
      <td>`400`</td>
      <td>`invalid_paging`</td>
      <td>La page demandée dépasse le maximum autorisé de 1000 enregistrements.</td>
      <td>L’API a été limitée à ne renvoyer qu’un maximum de 1000 enregistrements.</td>
    </tr>

    <tr>
      <td>`400`</td>
      <td>`invalid_query_string`</td>
      <td>Chaîne de requête non valide. Le message varie selon la cause.</td>
      <td>La chaîne de requête n’est pas valide.</td>
    </tr>

    <tr>
      <td>`401`</td>

      <td />

      <td>Jeton non valide.</td>

      <td />
    </tr>

    <tr>
      <td>`401`</td>

      <td />

      <td>Signature non valide reçue pour la validation du jeton Web JSON.</td>

      <td />
    </tr>

    <tr>
      <td>`401`</td>

      <td />

      <td>Le client n’est pas global.</td>

      <td />
    </tr>

    <tr>
      <td>`403`</td>
      <td>`insufficient_scope`</td>
      <td>Permission insuffisante; permission attendue : `read:organizations`.</td>
      <td>Tentative de lire/écrire un champ qui n’est pas autorisé avec les permissions de jeton du porteur fourni.</td>
    </tr>

    <tr>
      <td>`429`</td>

      <td />

      <td>Trop de requêtes. Vérifiez les en-têtes X-RateLimit-Limit, X-RateLimit-Remaining et X-RateLimit-Reset.</td>

      <td />
    </tr>
  </tbody>
</table>

<div id="retrieve-organization-by-id">
  ## Récupérer une organisation par son ID
</div>

Vous pouvez récupérer une organisation par son identifiant via Management API.

Effectuez un appel `GET` au point de terminaison`Get Organization`. Veillez à remplacer les valeurs de remplacement `ORG_ID` et `MGMT_API_ACCESS_TOKEN` par l’identifiant de votre organisation et le jeton d’accès à Management API, respectivement.

<AuthCodeGroup>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://{yourDomain}/api/v2/organizations/ORG_ID' \
    --header 'authorization: Bearer MGMT_API_ACCESS_TOKEN'
  ```

  ```csharp C# theme={null}
  var client = new RestClient("https://{yourDomain}/api/v2/organizations/ORG_ID");
  var request = new RestRequest(Method.GET);
  request.AddHeader("authorization", "Bearer MGMT_API_ACCESS_TOKEN");
  IRestResponse response = client.Execute(request);
  ```

  ```go Go theme={null}
  package main

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

  func main() {

  	url := "https://{yourDomain}/api/v2/organizations/ORG_ID"

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

  	req.Header.Add("authorization", "Bearer MGMT_API_ACCESS_TOKEN")

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

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

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

  }
  ```

  ```java Java theme={null}
  HttpResponse<String> response = Unirest.get("https://{yourDomain}/api/v2/organizations/ORG_ID")
    .header("authorization", "Bearer MGMT_API_ACCESS_TOKEN")
    .asString();
  ```

  ```javascript Node.JS theme={null}
  var axios = require("axios").default;

  var options = {
    method: 'GET',
    url: 'https://{yourDomain}/api/v2/organizations/ORG_ID',
    headers: {authorization: 'Bearer MGMT_API_ACCESS_TOKEN'}
  };

  axios.request(options).then(function (response) {
    console.log(response.data);
  }).catch(function (error) {
    console.error(error);
  });
  ```

  ```objc Obj-C theme={null}
  #import <Foundation/Foundation.h>

  NSDictionary *headers = @{ @"authorization": @"Bearer MGMT_API_ACCESS_TOKEN" };

  NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://{yourDomain}/api/v2/organizations/ORG_ID"]
                                                         cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                     timeoutInterval:10.0];
  [request setHTTPMethod:@"GET"];
  [request setAllHTTPHeaderFields:headers];

  NSURLSession *session = [NSURLSession sharedSession];
  NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                              completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                  if (error) {
                                                      NSLog(@"%@", error);
                                                  } else {
                                                      NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                      NSLog(@"%@", httpResponse);
                                                  }
                                              }];
  [dataTask resume];
  ```

  ```php PHP theme={null}
  $curl = curl_init();

  curl_setopt_array($curl, [
    CURLOPT_URL => "https://{yourDomain}/api/v2/organizations/ORG_ID",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => [
      "authorization: Bearer MGMT_API_ACCESS_TOKEN"
    ],
  ]);

  $response = curl_exec($curl);
  $err = curl_error($curl);

  curl_close($curl);

  if ($err) {
    echo "cURL Error #:" . $err;
  } else {
    echo $response;
  }
  ```

  ```python Python theme={null}
  import http.client

  conn = http.client.HTTPSConnection("")

  headers = { 'authorization': "Bearer MGMT_API_ACCESS_TOKEN" }

  conn.request("GET", "/{yourDomain}/api/v2/organizations/ORG_ID", headers=headers)

  res = conn.getresponse()
  data = res.read()

  print(data.decode("utf-8"))
  ```

  ```ruby Ruby theme={null}
  require 'uri'
  require 'net/http'
  require 'openssl'

  url = URI("https://{yourDomain}/api/v2/organizations/ORG_ID")

  http = Net::HTTP.new(url.host, url.port)
  http.use_ssl = true
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE

  request = Net::HTTP::Get.new(url)
  request["authorization"] = 'Bearer MGMT_API_ACCESS_TOKEN'

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

  ```swift Swift theme={null}
  import Foundation

  let headers = ["authorization": "Bearer MGMT_API_ACCESS_TOKEN"]

  let request = NSMutableURLRequest(url: NSURL(string: "https://{yourDomain}/api/v2/organizations/ORG_ID")! 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)
    } else {
      let httpResponse = response as? HTTPURLResponse
      print(httpResponse)
    }
  })

  dataTask.resume()
  ```
</AuthCodeGroup>

<Callout icon="file-lines" color="#0EA5E9" iconType="regular">
  **Trouvez votre domaine Auth0**

  Si votre domaine Auth0 est le nom de votre locataire, votre sous-domaine régional (sauf si votre locataire se trouve aux États-Unis et a été créé avant juin 2020), est `.auth0.com`. Par exemple, si votre nom de locataire est `travel0`, votre nom de domaine Auth0 sera `travel0.us.auth0.com`. (Si votre locataire est aux États-Unis et qu’il a été créé avant juin 2020, votre nom de domaine Auth0 sera `https://travel0.auth0.com`.)

  Si vous utilisez des domaines personnalisés, votre domaine est le nom de votre domaine personnalisé.
</Callout>

<table class="table">
  <thead>
    <tr>
      <th>Valeur</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`ORG_ID`</td>
      <td>ID de l’organisation que vous souhaitez récupérer.</td>
    </tr>

    <tr>
      <td>`MGMT_API_ACCESS_TOKEN`</td>
      <td><a href="/docs/fr-CA/fr-ca/tokens/management-api-access-tokens">Jeton d’accès à Management API</a> avec la permission `read:organizations`.</td>
    </tr>
  </tbody>
</table>

<div id="response-status-codes">
  ### Codes d’état des réponses
</div>

Les codes d’état de réponse possibles sont les suivants :

<table class="table">
  <thead>
    <tr>
      <th>Code d’état</th>
      <th>Code d’erreur</th>
      <th>Message</th>
      <th>Cause</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`200`</td>

      <td />

      <td>Organisation récupérée avec succès.</td>

      <td />
    </tr>

    <tr>
      <td>`400`</td>
      <td>`invalid_query_string`</td>
      <td>Chaîne de requête de demande non valide. Le message variera en fonction de la cause.</td>
      <td>La chaîne de requête n’est pas valide.</td>
    </tr>

    <tr>
      <td>`401`</td>

      <td />

      <td>Jeton non valide.</td>

      <td />
    </tr>

    <tr>
      <td>`401`</td>

      <td />

      <td>Signature non valide reçue pour la validation du jeton Web JSON.</td>

      <td />
    </tr>

    <tr>
      <td>`401`</td>

      <td />

      <td>Le client n’est pas global.</td>

      <td />
    </tr>

    <tr>
      <td>`403`</td>
      <td>`insufficient_scope`</td>
      <td>Permission insuffisante; on s’attend à l’un des éléments suivants : `read:organizations`.</td>
      <td>Tentative de lire/écrire un champ qui n’est pas autorisé avec les permissions de jeton du porteur fourni.</td>
    </tr>

    <tr>
      <td>`429`</td>

      <td />

      <td>Trop de requêtes. Vérifiez les en-têtes X-RateLimit-Limit, X-RateLimit-Remaining et X-RateLimit-Reset.</td>

      <td />
    </tr>
  </tbody>
</table>

<div id="retrieve-organization-by-name">
  ## Récupérer une organisation par son nom
</div>

Vous pouvez récupérer une organisation par son nom via Management API.

Effectuez un appel `GET` au point de terminaison`Get Organization by Name`. Veillez à remplacer les valeurs fictives `ORG_NAME` et `MGMT_API_ACCESS_TOKEN` par l’identifiant de votre organisation et le jeton d’accès à Management API, respectivement.

<AuthCodeGroup>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://{yourDomain}/api/v2/organizations/name/ORG_NAME' \
    --header 'authorization: Bearer MGMT_API_ACCESS_TOKEN'
  ```

  ```csharp C# theme={null}
  var client = new RestClient("https://{yourDomain}/api/v2/organizations/name/ORG_NAME");
  var request = new RestRequest(Method.GET);
  request.AddHeader("authorization", "Bearer MGMT_API_ACCESS_TOKEN");
  IRestResponse response = client.Execute(request);
  ```

  ```go Go theme={null}
  package main

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

  func main() {

  	url := "https://{yourDomain}/api/v2/organizations/name/ORG_NAME"

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

  	req.Header.Add("authorization", "Bearer MGMT_API_ACCESS_TOKEN")

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

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

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

  }
  ```

  ```java Java theme={null}
  HttpResponse<String> response = Unirest.get("https://{yourDomain}/api/v2/organizations/name/ORG_NAME")
    .header("authorization", "Bearer MGMT_API_ACCESS_TOKEN")
    .asString();
  ```

  ```javascript Node.JS theme={null}
  var axios = require("axios").default;

  var options = {
    method: 'GET',
    url: 'https://{yourDomain}/api/v2/organizations/name/ORG_NAME',
    headers: {authorization: 'Bearer MGMT_API_ACCESS_TOKEN'}
  };

  axios.request(options).then(function (response) {
    console.log(response.data);
  }).catch(function (error) {
    console.error(error);
  });
  ```

  ```objc Obj-C theme={null}
  #import <Foundation/Foundation.h>

  NSDictionary *headers = @{ @"authorization": @"Bearer MGMT_API_ACCESS_TOKEN" };

  NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://{yourDomain}/api/v2/organizations/name/ORG_NAME"]
                                                         cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                     timeoutInterval:10.0];
  [request setHTTPMethod:@"GET"];
  [request setAllHTTPHeaderFields:headers];

  NSURLSession *session = [NSURLSession sharedSession];
  NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                              completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                  if (error) {
                                                      NSLog(@"%@", error);
                                                  } else {
                                                      NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                      NSLog(@"%@", httpResponse);
                                                  }
                                              }];
  [dataTask resume];
  ```

  ```php PHP theme={null}
  $curl = curl_init();

  curl_setopt_array($curl, [
    CURLOPT_URL => "https://{yourDomain}/api/v2/organizations/name/ORG_NAME",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => [
      "authorization: Bearer MGMT_API_ACCESS_TOKEN"
    ],
  ]);

  $response = curl_exec($curl);
  $err = curl_error($curl);

  curl_close($curl);

  if ($err) {
    echo "cURL Error #:" . $err;
  } else {
    echo $response;
  }
  ```

  ```python Python theme={null}
  import http.client

  conn = http.client.HTTPSConnection("")

  headers = { 'authorization': "Bearer MGMT_API_ACCESS_TOKEN" }

  conn.request("GET", "/{yourDomain}/api/v2/organizations/name/ORG_NAME", headers=headers)

  res = conn.getresponse()
  data = res.read()

  print(data.decode("utf-8"))
  ```

  ```ruby Ruby theme={null}
  require 'uri'
  require 'net/http'
  require 'openssl'

  url = URI("https://{yourDomain}/api/v2/organizations/name/ORG_NAME")

  http = Net::HTTP.new(url.host, url.port)
  http.use_ssl = true
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE

  request = Net::HTTP::Get.new(url)
  request["authorization"] = 'Bearer MGMT_API_ACCESS_TOKEN'

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

  ```swift Swift theme={null}
  import Foundation

  let headers = ["authorization": "Bearer MGMT_API_ACCESS_TOKEN"]

  let request = NSMutableURLRequest(url: NSURL(string: "https://{yourDomain}/api/v2/organizations/name/ORG_NAME")! 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)
    } else {
      let httpResponse = response as? HTTPURLResponse
      print(httpResponse)
    }
  })

  dataTask.resume()
  ```
</AuthCodeGroup>

<Callout icon="file-lines" color="#0EA5E9" iconType="regular">
  **Trouvez votre domaine Auth0**

  Si votre domaine Auth0 est le nom de votre locataire, votre sous-domaine régional (sauf si votre locataire se trouve aux États-Unis et a été créé avant juin 2020), est `.auth0.com`. Par exemple, si votre nom de locataire est `travel0`, votre nom de domaine Auth0 sera `travel0.us.auth0.com`. (Si votre locataire est aux États-Unis et qu’il a été créé avant juin 2020, votre nom de domaine Auth0 sera `https://travel0.auth0.com`.)

  Si vous utilisez des domaines personnalisés, votre domaine est le nom de votre domaine personnalisé.
</Callout>

<table class="table">
  <thead>
    <tr>
      <th>Valeur</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`ORG_ NAME`</td>
      <td>Nom de l’organisation à récupérer. Longueur maximum : 50 caractères.</td>
    </tr>

    <tr>
      <td>`MGMT_API_ACCESS_TOKEN`</td>
      <td><a href="/docs/fr-CA/fr-ca/tokens/management-api-access-tokens">Jeton d’accès à Management API</a> avec la permission `read:organizations`.</td>
    </tr>
  </tbody>
</table>

<div id="response-status-codes">
  ### Codes d’état des réponses
</div>

Les codes d’état de réponse possibles sont les suivants :

<table class="table">
  <thead>
    <tr>
      <th>Code d’état</th>
      <th>Code d’erreur</th>
      <th>Message</th>
      <th>Cause</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`200`</td>

      <td />

      <td>Organisations récupérées avec succès.</td>

      <td />
    </tr>

    <tr>
      <td>`400`</td>
      <td>`invalid_query_string`</td>
      <td>Chaîne de requête de demande non valide. Le message variera en fonction de la cause.</td>
      <td>La chaîne de requête n’est pas valide.</td>
    </tr>

    <tr>
      <td>`401`</td>

      <td />

      <td>Jeton non valide.</td>

      <td />
    </tr>

    <tr>
      <td>`401`</td>

      <td />

      <td>Signature non valide reçue pour la validation du jeton Web JSON.</td>

      <td />
    </tr>

    <tr>
      <td>`401`</td>

      <td />

      <td>Le client n’est pas global.</td>

      <td />
    </tr>

    <tr>
      <td>`403`</td>
      <td>`insufficient_scope`</td>
      <td>Permission insuffisante; on s’attend à l’un des éléments suivants : `read:organizations`.</td>
      <td>Tentative de lire/écrire un champ qui n’est pas autorisé avec les permissions de jeton du porteur fourni.</td>
    </tr>

    <tr>
      <td>`429`</td>

      <td />

      <td>Trop de requêtes. Vérifiez les en-têtes X-RateLimit-Limit, X-RateLimit-Remaining et X-RateLimit-Reset.</td>

      <td />
    </tr>
  </tbody>
</table>
