教學課程:建立 Active Directory B2C 租用戶Tutorial: Create an Azure Active Directory B2C tenant

應用程式必須先在您管理的租用戶中完成註冊,才可以與 Azure Active Directory (Azure AD) B2C 互動。Before your applications can interact with Azure Active Directory (Azure AD) B2C, they must be registered in a tenant that you manage.

在本文中,您將了解:In this article, you learn how to:

  • 建立 Azure AD B2C 租用戶Create an Azure AD B2C tenant
  • 將您的租用戶連結至您的訂用帳戶Link your tenant to your subscription

您會在下一個教學課程中了解如何註冊應用程式。You learn how to register an application in the next tutorial.

如果您沒有 Azure 訂用帳戶,請在開始前建立 免費帳戶If you don't have an Azure subscription, create a free account before you begin.

建立 Azure AD B2C 租用戶Create an Azure AD B2C tenant

  1. 登入 Azure 入口網站Sign in to the Azure portal.

  2. 請確定您使用包含您訂用帳戶的目錄。Make sure you're using the directory that contains your subscription. 按一下 目錄和訂用帳戶篩選在上方功能表中,然後選取包含您訂用帳戶的目錄。Click the Directory and subscription filter in the top menu, then select the directory that contains your subscription. 這個目錄是不同於另一個將包含您的 Azure AD B2C 租用戶。This directory is different from the one that will contain your Azure AD B2C tenant.

    切換至訂用帳戶目錄

  3. 選擇 Azure 入口網站左上角的 [建立資源] 。Choose Create a resource in the top-left corner of the Azure portal.

  4. 搜尋並選取 [Active Directory B2C] ,然後按一下 [建立] 。Search for and select Active Directory B2C, and then click Create.

  5. 選擇建立新的 Azure AD B2C 租用戶輸入組織名稱和初始網域名稱。Choose Create a new Azure AD B2C Tenant and enter an organization name and initial domain name. 選取國家/地區 (它之後無法變更),然後按一下建立Select the country/region (it can't be changed later), and then click Create.

    初始網域名稱做為您的租用戶名稱的一部分。The initial domain name is used as part of your tenant name. 在此範例中,租用戶名稱為contoso0926Tenant.onmicrosoft.com:In this example, the tenant name is contoso0926Tenant.onmicrosoft.com:

    建立租用戶

  6. 建立新的 B2C 租用戶或連結至現有的租用戶頁面上,選擇我的 Azure 訂用帳戶的連結現有的 Azure AD B2C 租用戶On the Create new B2C Tenant or Link to existing Tenant page, choose Link an existing Azure AD B2C Tenant to my Azure subscription.

    選取您所建立的租用戶,然後選取您的訂用帳戶。Select the tenant that you created, and select your subscription.

    針對 資源群組中,選取新建For resource group, select Create new. 輸入將包含租用戶的資源群組名稱,選取該位置,然後按一下 [建立] 。Enter a name for the resource group that will contain the tenant, select the location, and then click Create.

  7. 若要開始使用新的租用戶,請確定您使用按一下包含您的 Azure AD B2C 租用戶的目錄目錄和訂用帳戶篩選頂端的功能表,然後選擇包含它的目錄中。To start using your new tenant, make sure you're using the directory that contains your Azure AD B2C tenant by clicking the Directory and subscription filter in the top menu and choosing the directory that contains it.

    如果一開始您沒有看到新的 Azure B2C 租用戶清單中,重新整理瀏覽器視窗,然後選取目錄和訂用帳戶篩選上方功能表中,一次。If at first you don't see your new Azure B2C tenant in the list, refresh your browser window, then select the Directory and subscription filter again in the top menu.

    切換至租用戶目錄

後續步驟Next steps

在本文中,您已了解如何:In this article, you learned how to:

  • 建立 Azure AD B2C 租用戶Create an Azure AD B2C tenant
  • 將您的租用戶連結至您的訂用帳戶Link your tenant to your subscription

接下來,了解如何在新的租用戶中註冊 web 應用程式。Next, learn how to register a web application in your new tenant.