getDomains

Use this data source to access information about existing Domains within Azure Active Directory.

NOTE: If you’re authenticating using a Service Principal then it must have permissions to Directory.Read.All within the Windows Azure Active Directory API.

Example Usage

using Pulumi;
using AzureAD = Pulumi.AzureAD;

class MyStack : Stack
{
    public MyStack()
    {
        var aadDomains = Output.Create(AzureAD.GetDomains.InvokeAsync());
        this.Domains = aadDomains.Apply(aadDomains => aadDomains.Domains);
    }

    [Output("domains")]
    public Output<string> Domains { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-azuread/sdk/v4/go/azuread"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		aadDomains, err := azuread.GetDomains(ctx, nil, nil)
		if err != nil {
			return err
		}
		ctx.Export("domains", aadDomains.Domains)
		return nil
	})
}
import pulumi
import pulumi_azuread as azuread

aad_domains = azuread.get_domains()
pulumi.export("domains", aad_domains.domains)
import * as pulumi from "@pulumi/pulumi";
import * as azuread from "@pulumi/azuread";

const aadDomains = azuread.getDomains({});
export const domains = aadDomains.then(aadDomains => aadDomains.domains);

Using getDomains

function getDomains(args: GetDomainsArgs, opts?: InvokeOptions): Promise<GetDomainsResult>
def get_domains(include_unverified: Optional[bool] = None,
                only_default: Optional[bool] = None,
                only_initial: Optional[bool] = None,
                opts: Optional[InvokeOptions] = None) -> GetDomainsResult
func GetDomains(ctx *Context, args *GetDomainsArgs, opts ...InvokeOption) (*GetDomainsResult, error)

Note: This function is named GetDomains in the Go SDK.

public static class GetDomains {
    public static Task<GetDomainsResult> InvokeAsync(GetDomainsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

IncludeUnverified bool
Set to true if unverified Azure AD domains should be included. Defaults to false.
OnlyDefault bool
Set to true to only return the default domain.
OnlyInitial bool
Set to true to only return the initial domain, which is your primary Azure Active Directory tenant domain. Defaults to false.
IncludeUnverified bool
Set to true if unverified Azure AD domains should be included. Defaults to false.
OnlyDefault bool
Set to true to only return the default domain.
OnlyInitial bool
Set to true to only return the initial domain, which is your primary Azure Active Directory tenant domain. Defaults to false.
includeUnverified boolean
Set to true if unverified Azure AD domains should be included. Defaults to false.
onlyDefault boolean
Set to true to only return the default domain.
onlyInitial boolean
Set to true to only return the initial domain, which is your primary Azure Active Directory tenant domain. Defaults to false.
include_unverified bool
Set to true if unverified Azure AD domains should be included. Defaults to false.
only_default bool
Set to true to only return the default domain.
only_initial bool
Set to true to only return the initial domain, which is your primary Azure Active Directory tenant domain. Defaults to false.

getDomains Result

The following output properties are available:

Domains List<Pulumi.AzureAD.Outputs.GetDomainsDomain>
A list of domains. Each domain object provides the attributes documented below.
Id string
The provider-assigned unique ID for this managed resource.
IncludeUnverified bool
OnlyDefault bool
OnlyInitial bool
Domains []GetDomainsDomain
A list of domains. Each domain object provides the attributes documented below.
Id string
The provider-assigned unique ID for this managed resource.
IncludeUnverified bool
OnlyDefault bool
OnlyInitial bool
domains GetDomainsDomain[]
A list of domains. Each domain object provides the attributes documented below.
id string
The provider-assigned unique ID for this managed resource.
includeUnverified boolean
onlyDefault boolean
onlyInitial boolean
domains Sequence[GetDomainsDomain]
A list of domains. Each domain object provides the attributes documented below.
id str
The provider-assigned unique ID for this managed resource.
include_unverified bool
only_default bool
only_initial bool

Supporting Types

GetDomainsDomain

AuthenticationType string
The authentication type of the domain (Managed or Federated).
DomainName string
The name of the domain.
IsDefault bool
True if this is the default domain that is used for user creation.
IsInitial bool
True if this is the initial domain created by Azure Active Directory.
IsVerified bool
True if the domain has completed domain ownership verification.
AuthenticationType string
The authentication type of the domain (Managed or Federated).
DomainName string
The name of the domain.
IsDefault bool
True if this is the default domain that is used for user creation.
IsInitial bool
True if this is the initial domain created by Azure Active Directory.
IsVerified bool
True if the domain has completed domain ownership verification.
authenticationType string
The authentication type of the domain (Managed or Federated).
domainName string
The name of the domain.
isDefault boolean
True if this is the default domain that is used for user creation.
isInitial boolean
True if this is the initial domain created by Azure Active Directory.
isVerified boolean
True if the domain has completed domain ownership verification.
authentication_type str
The authentication type of the domain (Managed or Federated).
domain_name str
The name of the domain.
is_default bool
True if this is the default domain that is used for user creation.
is_initial bool
True if this is the initial domain created by Azure Active Directory.
is_verified bool
True if the domain has completed domain ownership verification.

Package Details

Repository
https://github.com/pulumi/pulumi-azuread
License
Apache-2.0
Notes
This Pulumi package is based on the azuread Terraform Provider.