Microsoft.AzureActiveDirectory b2cDirectories

Bicep resource definition

The b2cDirectories resource type can be deployed to:

For a list of changed properties in each API version, see change log.

Remarks

You can create a B2C tenant with an ARM template or Bicep file, but you can't update an existing B2C tenant. Also, you can't redeploy a template with the same tenant name. If you need to update a B2C tenant, use B2C Tenants - Update.

Resource format

To create a Microsoft.AzureActiveDirectory/b2cDirectories resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.AzureActiveDirectory/b2cDirectories@2021-04-01' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  sku: {
    name: 'string'
    tier: 'A0'
  }
  properties: {
    createTenantProperties: {
      countryCode: 'string'
      displayName: 'string'
    }
  }
}

Property values

b2cDirectories

Name Description Value
name The resource name string (required)
location The location in which the resource is hosted and data resides. Can be one of 'United States', 'Europe', 'Asia Pacific', or 'Australia'. Refer to this documentation for more information. string (required)
tags Resource Tags Dictionary of tag names and values. See Tags in templates
sku SKU properties of the Azure AD B2C tenant. Learn more about Azure AD B2C billing at aka.ms/b2cBilling. B2CResourceSKU (required)
properties CreateTenantRequestBodyPropertiesOrB2CTenantResource... (required)

CreateTenantRequestBodyPropertiesOrB2CTenantResource...

Name Description Value
createTenantProperties These properties are used to create the Azure AD B2C tenant. These properties are not part of the Azure resource. CreateTenantProperties

CreateTenantProperties

Name Description Value
countryCode Country code of Azure tenant (e.g. 'US'). Refer to aka.ms/B2CDataResidency to see valid country codes and corresponding data residency locations. If you do not see a country code in an valid data residency location, choose one from the list. string
displayName The display name of the Azure AD B2C tenant. string

B2CResourceSKU

Name Description Value
name The name of the SKU for the tenant. 'PremiumP1'
'PremiumP2'
'Standard'
tier The tier of the tenant. 'A0'

ARM template resource definition

The b2cDirectories resource type can be deployed to:

For a list of changed properties in each API version, see change log.

Remarks

You can create a B2C tenant with an ARM template or Bicep file, but you can't update an existing B2C tenant. Also, you can't redeploy a template with the same tenant name. If you need to update a B2C tenant, use B2C Tenants - Update.

Resource format

To create a Microsoft.AzureActiveDirectory/b2cDirectories resource, add the following JSON to your template.

{
  "type": "Microsoft.AzureActiveDirectory/b2cDirectories",
  "apiVersion": "2021-04-01",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "sku": {
    "name": "string",
    "tier": "A0"
  },
  "properties": {
    "createTenantProperties": {
      "countryCode": "string",
      "displayName": "string"
    }
  }
}

Property values

b2cDirectories

Name Description Value
type The resource type 'Microsoft.AzureActiveDirectory/b2cDirectories'
apiVersion The resource api version '2021-04-01'
name The resource name string (required)
location The location in which the resource is hosted and data resides. Can be one of 'United States', 'Europe', 'Asia Pacific', or 'Australia'. Refer to this documentation for more information. string (required)
tags Resource Tags Dictionary of tag names and values. See Tags in templates
sku SKU properties of the Azure AD B2C tenant. Learn more about Azure AD B2C billing at aka.ms/b2cBilling. B2CResourceSKU (required)
properties CreateTenantRequestBodyPropertiesOrB2CTenantResource... (required)

CreateTenantRequestBodyPropertiesOrB2CTenantResource...

Name Description Value
createTenantProperties These properties are used to create the Azure AD B2C tenant. These properties are not part of the Azure resource. CreateTenantProperties

CreateTenantProperties

Name Description Value
countryCode Country code of Azure tenant (e.g. 'US'). Refer to aka.ms/B2CDataResidency to see valid country codes and corresponding data residency locations. If you do not see a country code in an valid data residency location, choose one from the list. string
displayName The display name of the Azure AD B2C tenant. string

B2CResourceSKU

Name Description Value
name The name of the SKU for the tenant. 'PremiumP1'
'PremiumP2'
'Standard'
tier The tier of the tenant. 'A0'

Terraform (AzAPI provider) resource definition

The b2cDirectories resource type can be deployed to:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.AzureActiveDirectory/b2cDirectories resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.AzureActiveDirectory/b2cDirectories@2021-04-01"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  body = jsonencode({
    properties = {
      createTenantProperties = {
        countryCode = "string"
        displayName = "string"
      }
    }
    sku = {
      name = "string"
      tier = "A0"
    }
  })
}

Property values

b2cDirectories

Name Description Value
type The resource type "Microsoft.AzureActiveDirectory/b2cDirectories@2021-04-01"
name The resource name string (required)
location The location in which the resource is hosted and data resides. Can be one of 'United States', 'Europe', 'Asia Pacific', or 'Australia'. Refer to this documentation for more information. string (required)
parent_id To deploy to a resource group, use the ID of that resource group. string (required)
tags Resource Tags Dictionary of tag names and values.
sku SKU properties of the Azure AD B2C tenant. Learn more about Azure AD B2C billing at aka.ms/b2cBilling. B2CResourceSKU (required)
properties CreateTenantRequestBodyPropertiesOrB2CTenantResource... (required)

CreateTenantRequestBodyPropertiesOrB2CTenantResource...

Name Description Value
createTenantProperties These properties are used to create the Azure AD B2C tenant. These properties are not part of the Azure resource. CreateTenantProperties

CreateTenantProperties

Name Description Value
countryCode Country code of Azure tenant (e.g. 'US'). Refer to aka.ms/B2CDataResidency to see valid country codes and corresponding data residency locations. If you do not see a country code in an valid data residency location, choose one from the list. string
displayName The display name of the Azure AD B2C tenant. string

B2CResourceSKU

Name Description Value
name The name of the SKU for the tenant. "PremiumP1"
"PremiumP2"
"Standard"
tier The tier of the tenant. "A0"