1. Packages
  2. Azure Classic
  3. API Docs
  4. aadb2c
  5. getDirectory

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.aadb2c.getDirectory

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Use this data source to access information about an existing AAD B2C Directory.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.aadb2c.getDirectory({
        resourceGroupName: "example-rg",
        domainName: "exampleb2ctenant.onmicrosoft.com",
    });
    export const tenantId = example.then(example => example.tenantId);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.aadb2c.get_directory(resource_group_name="example-rg",
        domain_name="exampleb2ctenant.onmicrosoft.com")
    pulumi.export("tenantId", example.tenant_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/aadb2c"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := aadb2c.LookupDirectory(ctx, &aadb2c.LookupDirectoryArgs{
    			ResourceGroupName: "example-rg",
    			DomainName:        "exampleb2ctenant.onmicrosoft.com",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("tenantId", example.TenantId)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.AadB2C.GetDirectory.Invoke(new()
        {
            ResourceGroupName = "example-rg",
            DomainName = "exampleb2ctenant.onmicrosoft.com",
        });
    
        return new Dictionary<string, object?>
        {
            ["tenantId"] = example.Apply(getDirectoryResult => getDirectoryResult.TenantId),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.aadb2c.Aadb2cFunctions;
    import com.pulumi.azure.aadb2c.inputs.GetDirectoryArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var example = Aadb2cFunctions.getDirectory(GetDirectoryArgs.builder()
                .resourceGroupName("example-rg")
                .domainName("exampleb2ctenant.onmicrosoft.com")
                .build());
    
            ctx.export("tenantId", example.applyValue(getDirectoryResult -> getDirectoryResult.tenantId()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:aadb2c:getDirectory
          Arguments:
            resourceGroupName: example-rg
            domainName: exampleb2ctenant.onmicrosoft.com
    outputs:
      tenantId: ${example.tenantId}
    

    Using getDirectory

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getDirectory(args: GetDirectoryArgs, opts?: InvokeOptions): Promise<GetDirectoryResult>
    function getDirectoryOutput(args: GetDirectoryOutputArgs, opts?: InvokeOptions): Output<GetDirectoryResult>
    def get_directory(domain_name: Optional[str] = None,
                      resource_group_name: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetDirectoryResult
    def get_directory_output(domain_name: Optional[pulumi.Input[str]] = None,
                      resource_group_name: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetDirectoryResult]
    func LookupDirectory(ctx *Context, args *LookupDirectoryArgs, opts ...InvokeOption) (*LookupDirectoryResult, error)
    func LookupDirectoryOutput(ctx *Context, args *LookupDirectoryOutputArgs, opts ...InvokeOption) LookupDirectoryResultOutput

    > Note: This function is named LookupDirectory in the Go SDK.

    public static class GetDirectory 
    {
        public static Task<GetDirectoryResult> InvokeAsync(GetDirectoryArgs args, InvokeOptions? opts = null)
        public static Output<GetDirectoryResult> Invoke(GetDirectoryInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDirectoryResult> getDirectory(GetDirectoryArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:aadb2c/getDirectory:getDirectory
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DomainName string
    Domain name of the B2C tenant, including the .onmicrosoft.com suffix.
    ResourceGroupName string
    The name of the Resource Group where the AAD B2C Directory exists.
    DomainName string
    Domain name of the B2C tenant, including the .onmicrosoft.com suffix.
    ResourceGroupName string
    The name of the Resource Group where the AAD B2C Directory exists.
    domainName String
    Domain name of the B2C tenant, including the .onmicrosoft.com suffix.
    resourceGroupName String
    The name of the Resource Group where the AAD B2C Directory exists.
    domainName string
    Domain name of the B2C tenant, including the .onmicrosoft.com suffix.
    resourceGroupName string
    The name of the Resource Group where the AAD B2C Directory exists.
    domain_name str
    Domain name of the B2C tenant, including the .onmicrosoft.com suffix.
    resource_group_name str
    The name of the Resource Group where the AAD B2C Directory exists.
    domainName String
    Domain name of the B2C tenant, including the .onmicrosoft.com suffix.
    resourceGroupName String
    The name of the Resource Group where the AAD B2C Directory exists.

    getDirectory Result

    The following output properties are available:

    BillingType string
    The type of billing for the AAD B2C tenant. Possible values include: MAU or Auths.
    DataResidencyLocation string
    Location in which the B2C tenant is hosted and data resides. See official docs for more information.
    DomainName string
    EffectiveStartDate string
    The date from which the billing type took effect. May not be populated until after the first billing cycle.
    Id string
    The provider-assigned unique ID for this managed resource.
    ResourceGroupName string
    SkuName string
    Billing SKU for the B2C tenant. See official docs for more information.
    Tags Dictionary<string, string>
    A mapping of tags assigned to the AAD B2C Directory.
    TenantId string
    The Tenant ID for the AAD B2C tenant.
    BillingType string
    The type of billing for the AAD B2C tenant. Possible values include: MAU or Auths.
    DataResidencyLocation string
    Location in which the B2C tenant is hosted and data resides. See official docs for more information.
    DomainName string
    EffectiveStartDate string
    The date from which the billing type took effect. May not be populated until after the first billing cycle.
    Id string
    The provider-assigned unique ID for this managed resource.
    ResourceGroupName string
    SkuName string
    Billing SKU for the B2C tenant. See official docs for more information.
    Tags map[string]string
    A mapping of tags assigned to the AAD B2C Directory.
    TenantId string
    The Tenant ID for the AAD B2C tenant.
    billingType String
    The type of billing for the AAD B2C tenant. Possible values include: MAU or Auths.
    dataResidencyLocation String
    Location in which the B2C tenant is hosted and data resides. See official docs for more information.
    domainName String
    effectiveStartDate String
    The date from which the billing type took effect. May not be populated until after the first billing cycle.
    id String
    The provider-assigned unique ID for this managed resource.
    resourceGroupName String
    skuName String
    Billing SKU for the B2C tenant. See official docs for more information.
    tags Map<String,String>
    A mapping of tags assigned to the AAD B2C Directory.
    tenantId String
    The Tenant ID for the AAD B2C tenant.
    billingType string
    The type of billing for the AAD B2C tenant. Possible values include: MAU or Auths.
    dataResidencyLocation string
    Location in which the B2C tenant is hosted and data resides. See official docs for more information.
    domainName string
    effectiveStartDate string
    The date from which the billing type took effect. May not be populated until after the first billing cycle.
    id string
    The provider-assigned unique ID for this managed resource.
    resourceGroupName string
    skuName string
    Billing SKU for the B2C tenant. See official docs for more information.
    tags {[key: string]: string}
    A mapping of tags assigned to the AAD B2C Directory.
    tenantId string
    The Tenant ID for the AAD B2C tenant.
    billing_type str
    The type of billing for the AAD B2C tenant. Possible values include: MAU or Auths.
    data_residency_location str
    Location in which the B2C tenant is hosted and data resides. See official docs for more information.
    domain_name str
    effective_start_date str
    The date from which the billing type took effect. May not be populated until after the first billing cycle.
    id str
    The provider-assigned unique ID for this managed resource.
    resource_group_name str
    sku_name str
    Billing SKU for the B2C tenant. See official docs for more information.
    tags Mapping[str, str]
    A mapping of tags assigned to the AAD B2C Directory.
    tenant_id str
    The Tenant ID for the AAD B2C tenant.
    billingType String
    The type of billing for the AAD B2C tenant. Possible values include: MAU or Auths.
    dataResidencyLocation String
    Location in which the B2C tenant is hosted and data resides. See official docs for more information.
    domainName String
    effectiveStartDate String
    The date from which the billing type took effect. May not be populated until after the first billing cycle.
    id String
    The provider-assigned unique ID for this managed resource.
    resourceGroupName String
    skuName String
    Billing SKU for the B2C tenant. See official docs for more information.
    tags Map<String>
    A mapping of tags assigned to the AAD B2C Directory.
    tenantId String
    The Tenant ID for the AAD B2C tenant.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi