Hello @Cloudy , there is no additional steps required to create a B2C tenant trough Azure REST. What you should do is to query operation async progress trough a URL provided in the create response location header. While the operation is in progress you will get a 202 status code and once the it has completed a 200 status code. The response content will provide information about the created tenant or the error details.
In your current $b2cTenantObject you should change sku.tier to "A0". Also ensure resource name includes the .onmicrosoft.com sufix. Eg.
# PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureActiveDirectory/b2cDirectories/contoso.onmicrosoft.com?api-version=2023-01-18-preview
$b2cTenantObject = [PSCustomObject] @{
"location" = $location
"sku" = @{
"Name" = "Standard"
"Tier" = "A0"
}
"properties" =@{
"createTenantProperties"=@{
"displayName"=$b2CTenantName
"countryCode"="FR"
}
}
}
Let us know if you need additional assistance. If the answer was helpful, please accept it and rate it so that others facing a similar issue can easily find a solution.