Skip to main content
GET
https://{tenantDomain}/api/v2
/
organizations
/
{id}
/
discovery-domains
/
name
/
{discovery_domain}
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new ManagementClient(
            token: "<token>"
        );

        await client.Organizations.DiscoveryDomains.GetByNameAsync(
            "id",
            "discovery_domain"
        );
    }

}
package com.example.usage;

import com.auth0.client.mgmt.ManagementApi;

public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();

client.organizations().discoveryDomains().getByName("id", "discovery_domain");
}
}
<?php

namespace Example;

use Auth0\SDK\API\Management\Management;

$client = new Management(
token: '<token>',
);
$client->organizations->discoveryDomains->getByName(
'id',
'discovery_domain',
);
from auth0.management import ManagementClient

client = ManagementClient(
token="<token>",
)

client.organizations.discovery_domains.get_by_name(
id="id",
discovery_domain="discovery_domain",
)
require "auth0"

client = Auth0::Management.new(token: "<token>")

client.organizations.discovery_domains.get_by_name(
id: "id",
discovery_domain: "discovery_domain"
)
curl --request GET \
--url https://{tenantDomain}/api/v2/organizations/{id}/discovery-domains/name/{discovery_domain} \
--header 'Authorization: Bearer <token>'
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://{tenantDomain}/api/v2/organizations/{id}/discovery-domains/name/{discovery_domain}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main

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

func main() {

url := "https://{tenantDomain}/api/v2/organizations/{id}/discovery-domains/name/{discovery_domain}"

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(string(body))

}
{
  "id": "<string>",
  "domain": "<string>",
  "verification_txt": "<string>",
  "verification_host": "<string>",
  "use_for_organization_discovery": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

ID of the organization.

discovery_domain
string
required

Domain name of the discovery domain.

Required string length: 3 - 255

Response

Organization discovery domain successfully retrieved.

id
string<organization-discovery-domain-id>
required

Organization discovery domain identifier.

domain
string
required

The domain name to associate with the organization e.g. acme.com.

Required string length: 3 - 255
Pattern: ^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$
status
enum<string>
required

The verification status of the discovery domain.

Available options:
pending,
verified
verification_txt
string
required

A unique token generated for the discovery domain. This must be placed in a DNS TXT record at the location specified by the verification_host field to prove domain ownership.

verification_host
string
required

The full domain where the TXT record should be added.

use_for_organization_discovery
boolean

Indicates whether this domain should be used for organization discovery.