{ "swagger": "2.0", "info": { "title": "B2CTenants", "version": "2019-01-01-preview", "description": "Manage the Azure resource for an Azure Active Directory B2C tenant." }, "host": "management.azure.com", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "flow": "implicit", "description": "Azure Active Directory OAuth2 Flow", "scopes": { "user_impersonation": "impersonate your user account" } } }, "paths": { "/subscriptions/{subscriptionId}/providers/Microsoft.AzureActiveDirectory/checkNameAvailability": { "post": { "tags": [ "B2CTenants" ], "operationId": "B2CTenants_CheckNameAvailability", "description": "Checks the availability and validity of a domain name for the tenant.", "x-ms-examples": { "Check name availability - available": { "$ref": "./examples/checkNameAvailability-available.json" }, "Check name availability - taken": { "$ref": "./examples/checkNameAvailability-taken.json" } }, "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "name": "checkNameAvailabilityRequestBody", "in": "body", "schema": { "$ref": "#/definitions/CheckNameAvailabilityRequestBody" } } ], "responses": { "200": { "description": "The result of checking for the name availability.", "schema": { "$ref": "#/definitions/NameAvailabilityResponse" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/CloudError" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureActiveDirectory/b2cDirectories": { "get": { "description": "Get all the Azure AD B2C tenant resources in a resource group.", "operationId": "B2CTenants_ListByResourceGroup", "tags": [ "B2CTenants" ], "x-ms-examples": { "B2CTenants_ListByResourceGroup": { "$ref": "./examples/listTenantsByResourceGroup.json" } }, "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/ResourceGroupNameParameter" } ], "responses": { "200": { "description": "List of Azure AD B2C tenants in resource group successfully retrieved.", "schema": { "$ref": "#/definitions/B2CTenantResourceList" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/CloudError" } } }, "x-ms-pageable": { "nextLinkName": null } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.AzureActiveDirectory/b2cDirectories": { "get": { "description": "Get all the Azure AD B2C tenant resources in a subscription.", "operationId": "B2CTenants_ListBySubscription", "tags": [ "B2CTenants" ], "x-ms-examples": { "B2CTenants_ListBySubscription": { "$ref": "./examples/listTenantsBySubscription.json" } }, "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Azure AD B2C tenant resources in subscription successfully retrieved.", "schema": { "$ref": "#/definitions/B2CTenantResourceList" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/CloudError" } } }, "x-ms-pageable": { "nextLinkName": null } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureActiveDirectory/b2cDirectories/{resourceName}": { "get": { "description": "Get the Azure AD B2C tenant resource.", "operationId": "B2CTenants_Get", "tags": [ "B2CTenants" ], "x-ms-examples": { "Get tenant": { "$ref": "./examples/getTenant.json" } }, "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ResourceNameParameter" } ], "responses": { "200": { "description": "Azure AD B2C tenant resource successfully retrieved.", "schema": { "$ref": "#/definitions/B2CTenantResource" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/CloudError" } } } }, "patch": { "description": "Update the Azure AD B2C tenant resource.", "operationId": "B2CTenants_Update", "tags": [ "B2CTenants" ], "x-ms-examples": { "Get tenant": { "$ref": "./examples/updateTenant.json" } }, "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ResourceNameParameter" }, { "name": "updateTenantRequestBody", "in": "body", "schema": { "$ref": "#/definitions/B2CTenantUpdateRequest" } } ], "responses": { "200": { "description": "Updated the Azure AD B2C tenant resource.", "schema": { "$ref": "#/definitions/B2CTenantResource" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/CloudError" } } } }, "put": { "operationId": "B2CTenants_Create", "description": "Initiates an async request to create both the Azure AD B2C tenant and the corresponding Azure resource linked to a subscription.", "x-ms-examples": { "Create tenant": { "$ref": "./examples/createTenant.json" } }, "tags": [ "B2CTenants" ], "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ResourceNameParameter" }, { "name": "createTenantRequestBody", "in": "body", "schema": { "$ref": "#/definitions/CreateTenantRequestBody" } } ], "responses": { "200": { "description": "OK. The expected resource type once successfully created from the async request.", "schema": { "$ref": "#/definitions/B2CTenantResource" } }, "201": { "description": "OK. The expected resource type once successfully created from the async request.", "schema": { "$ref": "#/definitions/B2CTenantResource" } }, "202": { "description": "Tenant create request accepted. The Location header indicates the URL/location in which to check to get the async status of the operation.", "headers": { "Location": { "description": "Contains the URL/location which can return the tenant provisioning status.", "type": "string" }, "Retry-After": { "description": "Contains the number of seconds to wait before checking the tenant provisioning status.", "type": "string" } } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/CloudError" } } }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "location" } }, "delete": { "operationId": "B2CTenants_Delete", "description": "Initiates an async operation to delete the Azure AD B2C tenant and Azure resource. The resource deletion can only happen as the last step in [the tenant deletion process](https://aka.ms/deleteB2Ctenant). ", "x-ms-examples": { "Delete tenant": { "$ref": "./examples/deleteTenant.json" } }, "tags": [ "B2CTenants" ], "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ResourceNameParameter" } ], "responses": { "200": { "description": "Resource deletion successful." }, "202": { "description": "Resource deletion request accepted. The Location header indicates the URL/location in which to check to get the async status of the operation. ", "headers": { "Location": { "description": "Contains the URL/location which can return the deletion status.", "type": "string" }, "Retry-After": { "description": "Contains the number of seconds to wait before checking the deletion status.", "type": "string" } } }, "204": { "description": "Request successful. Resource does not exist. " }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/CloudError" } } }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "location" } } }, "/providers/Microsoft.AzureActiveDirectory/operations": { "get": { "tags": [ "Operations" ], "operationId": "Operations_List", "x-ms-examples": { "operations_list": { "$ref": "./examples/OperationsList.json" } }, "description": "Lists the operations available from this provider.", "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Describe the result of a successful operation.", "schema": { "$ref": "#/definitions/OperationListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/CloudError" } } }, "x-ms-pageable": { "nextLinkName": null } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.AzureActiveDirectory/operations/{operationId}": { "get": { "tags": [ "Operations" ], "operationId": "Operations_GetAsyncStatus", "description": "Gets the status of the async operation.", "x-ms-examples": { "Get Async Status": { "$ref": "./examples/getAsyncOperationStatus.json" } }, "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "name": "operationId", "type": "string", "in": "path", "description": "The operation ID.", "required": true } ], "responses": { "200": { "description": "The async operation status.", "schema": { "$ref": "#/definitions/AsyncOperationStatus" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/CloudError" } } } } } }, "definitions": { "Operation": { "description": "Microsoft.AzureActiveDirectory REST API operation.", "type": "object", "properties": { "name": { "description": "Operation name: {provider}/{resource}/{operation}.", "type": "string", "readOnly": true }, "display": { "description": "The object that represents the operation.", "properties": { "provider": { "description": "Service provider: Microsoft.AzureActiveDirectory.", "type": "string", "readOnly": true }, "resource": { "description": "Resource on which the operation is performed: GuestUsages, etc.", "type": "string", "readOnly": true }, "operation": { "description": "Operation type: Read, write, delete, etc.", "type": "string", "readOnly": true }, "description": { "description": "Friendly name of the operation", "type": "string" } } } } }, "OperationListResult": { "description": "Result of listing operations for the resourceProvider", "properties": { "value": { "description": "List of cpim service operations supported by the Microsoft.AzureActiveDirectory resource provider.", "type": "array", "readOnly": true, "items": { "$ref": "#/definitions/Operation" } } } }, "AsyncOperationStatus": { "description": "The async operation status.", "properties": { "subscriptionId": { "type": "string", "description": "Subscription ID that the resource belongs to." }, "id": { "type": "string", "description": "The GET resource path for the operation." }, "name": { "type": "string", "description": "The operation ID." }, "status": { "description": "The status of the operation.", "type": "string", "enum": [ "Succeeded", "Pending", "Failed" ], "x-ms-enum": { "name": "StatusType", "modelAsString": false, "values": [ { "value": "Succeeded", "description": "The operation succeeded." }, { "value": "Pending", "description": "The operation is pending." }, { "value": "Failed", "description": "The operation failed." } ] } }, "startTime": { "type": "string", "description": "Start time of the async operation." }, "endTime": { "type": "string", "description": "End time of the async operation." }, "properties": { "$ref": "#/definitions/B2CTenantResourceProperties", "x-ms-client-flatten": true, "description": "The Azure AD B2C tenant resource properties" }, "error": { "description": "Error response if async operation failed.", "properties": { "code": { "type": "string", "description": "Error code." }, "message": { "type": "string", "description": "Error message." } } } } }, "B2CTenantResourceProperties": { "description": "Properties of the Azure AD B2C tenant Azure resource.", "type": "object", "properties": { "billingConfig": { "type": "object", "description": "The billing configuration for the tenant.", "properties": { "billingType": { "type": "string", "description": "The type of billing. Will be MAU for all new customers. If 'Auths', it can be updated to 'MAU'. Cannot be changed if value is 'MAU'. Learn more about Azure AD B2C billing at [aka.ms/b2cBilling](https://aka.ms/b2cbilling).", "enum": [ "MAU", "Auths" ], "x-ms-enum": { "name": "BillingType", "modelAsString": false, "values": [ { "value": "MAU", "description": "Azure AD B2C usage is billed to a linked Azure subscription and uses a monthly active users (MAU) billing model." }, { "value": "Auths", "description": "Azure AD B2C usage is billed to a linked Azure subscription and uses number of authentications based billing." } ] } }, "effectiveStartDateUtc": { "type": "string", "readOnly": true, "description": "The data from which the billing type took effect" } } }, "tenantId": { "type": "string", "description": "An identifier of the B2C tenant." } } }, "B2CResourceSKU": { "description": "SKU properties of the Azure AD B2C tenant. Learn more about Azure AD B2C billing at [aka.ms/b2cBilling](https://aka.ms/b2cBilling).", "properties": { "name": { "type": "string", "description": "The name of the SKU for the tenant.", "enum": [ "Standard", "PremiumP1", "PremiumP2" ], "x-ms-enum": { "name": "B2CResourceSKUName", "modelAsString": false, "values": [ { "value": "Standard", "description": "Azure AD B2C usage is billed to a linked Azure subscription and uses a monthly active users (MAU) billing model." }, { "value": "PremiumP1", "description": "Azure AD B2C usage is billed to a linked Azure subscription and uses number of authentications based billing." }, { "value": "PremiumP2", "description": "Azure AD B2C usage is billed to a linked Azure subscription and uses number of authentications based billing." } ] } }, "tier": { "type": "string", "description": "The tier of the tenant.", "enum": [ "A0" ], "x-ms-enum": { "name": "B2CResourceSKUTier", "modelAsString": false, "values": [ { "value": "A0", "description": "The SKU tier used for all Azure AD B2C tenants." } ] } } } }, "NameAvailabilityResponse": { "description": "Response of the CheckNameAvailability operation.", "properties": { "message": { "type": "string", "description": "Description of the reason if name is not available." }, "nameAvailable": { "type": "boolean", "description": "True if the name is available and can be used to create a new tenant. Otherwise false." }, "reason": { "$ref": "#/definitions/NameAvailabilityReason" } } }, "NameAvailabilityReason": { "description": "Describes the reason for the 'nameAvailable' value.", "type": "string", "enum": [ "AlreadyExists", "Invalid" ], "x-ms-enum": { "name": "NameAvailabilityReasonType", "modelAsString": false, "values": [ { "value": "AlreadyExists", "description": "The name is already in use and is therefore unavailable." }, { "value": "Invalid", "description": "The name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.)." } ] } }, "CheckNameAvailabilityRequestBody": { "type": "object", "description": "The information required to check the availability of the name for the tenant.", "required": [ "name", "countryCode" ], "properties": { "name": { "type": "string", "description": "The domain name to check for availability." }, "countryCode": { "$ref": "#/definitions/CountryCode" } } }, "B2CTenantUpdateRequest": { "type": "object", "description": "The request body to update the Azure AD B2C tenant resource.", "properties": { "sku": { "$ref": "#/definitions/B2CResourceSKU" }, "properties": { "$ref": "#/definitions/B2CTenantResourceProperties", "x-ms-client-flatten": true, "description": "The Azure AD B2C tenant resource properties." }, "tags": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Resource Tags" } } }, "B2CTenantResource": { "type": "object", "required": [ "location", "sku" ], "x-ms-azure-resource": true, "properties": { "type": { "type": "string", "description": "The type of the B2C tenant resource.", "readOnly": true, "enum": [ "Microsoft.AzureActiveDirectory/b2cDirectories" ], "x-ms-enum": { "name": "TypeValue", "modelAsString": false, "values": [ { "value": "Microsoft.AzureActiveDirectory/b2cDirectories", "description": "The resource type for Azure AD B2C tenant resource." } ] } }, "sku": { "$ref": "#/definitions/B2CResourceSKU" }, "properties": { "$ref": "#/definitions/B2CTenantResourceProperties", "x-ms-client-flatten": true, "description": "The B2C tenant resource properties" }, "id": { "type": "string", "readOnly": true, "description": "An identifier that represents the B2C tenant resource." }, "name": { "type": "string", "readOnly": true, "description": "The name of the B2C tenant resource." }, "location": { "type": "string", "description": "The location in which the resource is hosted and data resides. Can be one of 'United States', 'Europe', 'Asia Pacific', or 'Australia' (preview). Refer to [this documentation](https://aka.ms/B2CDataResidency) for more information.", "x-ms-mutability": [ "create", "read" ] }, "tags": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Resource Tags" } } }, "B2CTenantResourceList": { "description": "The collection of Azure AD B2C tenant resources", "properties": { "value": { "description": "List of guest usages resources", "type": "array", "readOnly": true, "items": { "$ref": "#/definitions/B2CTenantResource" } } } }, "CreateTenantRequestBody": { "type": "object", "description": "The information needed to create the Azure AD B2C tenant and corresponding Azure resource, which is used for billing purposes.", "required": [ "location", "sku", "properties" ], "x-ms-azure-resource": true, "properties": { "location": { "type": "string", "description": "The location in which the resource is hosted and data resides. Can be one of 'United States', 'Europe', 'Asia Pacific', or 'Australia' (preview). Refer to [this documentation](https://aka.ms/B2CDataResidency) for more information." }, "properties": { "type": "object", "properties": { "createTenantProperties": { "x-ms-client-flatten": true, "$ref": "#/definitions/CreateTenantProperties" } } }, "sku": { "$ref": "#/definitions/B2CResourceSKU" }, "tags": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Resource Tags" } } }, "CreateTenantProperties": { "type": "object", "description": "These properties are used to create the Azure AD B2C tenant. These properties are not part of the Azure resource.", "properties": { "displayName": { "description": "The display name of the B2C tenant.", "type": "string" }, "countryCode": { "$ref": "#/definitions/CountryCode" } } }, "CountryCode": { "type": "string", "description": "Country code of Azure tenant (e.g. 'US'). Refer to [aka.ms/B2CDataResidency](https://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." }, "CloudError": { "x-ms-external": true, "properties": { "error": { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse" } }, "description": "An error response for a resource management request." } }, "parameters": { "SubscriptionIdParameter": { "name": "subscriptionId", "in": "path", "required": true, "type": "string", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call." }, "ResourceGroupNameParameter": { "name": "resourceGroupName", "in": "path", "required": true, "type": "string", "description": "The name of the resource group.", "x-ms-parameter-location": "method" }, "ResourceNameParameter": { "name": "resourceName", "in": "path", "required": true, "type": "string", "description": "The initial domain name of the B2C tenant.", "x-ms-parameter-location": "method" }, "ApiVersionParameter": { "name": "api-version", "in": "query", "required": true, "type": "string", "description": "Version of the API to be used with the client request." } } }