在 Azure Active Directory (Azure AD) 中添加新的 Azure Stack Hub 用户帐户Add a new Azure Stack Hub user account in Azure Active Directory (Azure AD)

需要有用户帐户才能测试套餐和计划并创建资源。Before you can test offers and plans, and create resources, you'll need a user account. 使用 Azure 门户或 PowerShell 在 Azure AD 租户中创建用户帐户。You create a user account in your Azure AD tenant, by using the Azure portal or PowerShell.

使用 Azure 门户创建用户帐户Create user account using the Azure portal

必须具有 Azure 订阅才能使用 Azure 门户。You must have an Azure subscription to use the Azure portal.

  1. 登录到 AzureSign in to Azure.

  2. 在左侧导航栏中,选择“Active Directory”并切换到要用于 Azure Stack Hub 的目录(或创建一个新目录)。In the left navigation bar, select Active Directory and switch to the directory that you want to use for Azure Stack Hub (or create a new one).

  3. 选择“Azure Active Directory” > “用户” > “新建用户”。 Select Azure Active Directory > Users > New user.

    用户 - 突出显示新用户的所有用户页面

  4. 在“用户”页上,填写所需的信息。On the User page, fill out the required info.

    添加新用户,具有用户信息的用户页

    • 姓名(必填) :新用户的名字和姓氏。Name (required): The first and last name of the new user. 例如,Mary Parker。For example, Mary Parker.
    • 用户名(必填) :新用户的用户名。User name (required): The user name of the new user. 例如 mary@contoso.com。For example, mary@contoso.com. 用户名的域名部分必须是初始默认域名 <yourdomainname>.partner.onmschina.cn,或者是一个自定义域名,例如 contoso.com。The domain part of the user name must use either the initial default domain name, <yourdomainname>.partner.onmschina.cn, or a custom domain name, such as contoso.com. 若要详细了解如何创建自定义域名,请参阅如何向 Azure AD 添加自定义域名For more info on how to create a custom domain name, see How to add a custom domain name to Azure AD.
    • 个人资料:(选填)可以添加关于用户的详细信息。Profile: Optionally, you can add more info about the user. 也可以在以后添加用户信息。You can also add user info at a later time. 有关添加用户信息的详细信息,请参阅如何添加或更改用户个人资料信息For more info on adding user info, see How to add or change user profile information.
    • 目录角色:选择“用户”。Directory role: choose User.
  5. 选中“显示密码”并复制“密码”框中提供的自动生成的密码。Check Show Password and copy the autogenerated password provided in the Password box. 在初始登录过程中需要此密码。You'll need this password for the initial sign-in process.

  6. 选择“创建”。Select Create.

    用户已创建并添加到 Azure AD 租户。The user is created and added to your Azure AD tenant.

  7. 使用新帐户登录到 Azure 门户。Sign in to the Azure portal with the new account. 出现提示时,更改密码。Change the password when prompted.

  8. 使用新帐户登录到 https://portal.local.azurestack.external,以查看用户门户。Sign in to https://portal.local.azurestack.external with the new account to see the user portal.

使用 PowerShell 创建用户帐户Create a user account using PowerShell

如果没有 Azure 订阅,则无法使用 Azure 门户添加租户用户帐户。If you don't have an Azure subscription, you can't use the Azure portal to add a tenant user account. 在这种情况下,可以改用适用于 Windows PowerShell 的 Azure AD 模块。In this case, you can use the Azure AD Module for Windows PowerShell instead.

备注

如果使用 Microsoft 帐户部署 ASDK,则不能使用 Azure AD PowerShell 创建租户帐户。If you're using Microsoft Account to deploy the ASDK, you can't use Azure AD PowerShell to create a tenant account.

  1. 安装 64 位 版本的 适用于 IT 专业人员的 Microsoft Online Services 登录助手 RTWInstall the 64-bit version of the Microsoft Online Services Sign-in Assistant for IT Professionals RTW.

  2. 按照以下步骤安装适用于 Windows PowerShell 的 Azure AD 模块:Install the Azure AD Module for Windows PowerShell with these steps:

    • 打开提升的 Windows PowerShell 命令提示符(以管理员身份运行 Windows PowerShell)。Open an elevated Windows PowerShell command prompt (run Windows PowerShell as admin).
    • 运行 Install-Module MSOnline 命令。Run the Install-Module MSOnline command.
    • 如果提示安装 NuGet 提供程序,请选择 YEnterIf you're prompted to install the NuGet provider, select Y and Enter.
    • 如果提示从 PSGallery 安装模块,请选择 YEnterIf you're prompted to install the module from PSGallery, select Y and Enter.
  3. 运行以下 cmdlet:Run the following cmdlets:

    # Provide the Azure AD credential you use to deploy the ASDK.
    
            $msolcred = get-credential
    
    # Add a user account "Tenant Admin <username>@<yourdomainname>" with the initial password "<password>".
    
            connect-msolservice -credential $msolcred
            $user = new-msoluser -DisplayName "Tenant Admin" -UserPrincipalName <username>@<yourdomainname> -Password <password>
            Add-MsolRoleMember -RoleName "Company Administrator" -RoleMemberType User -RoleMemberObjectId $user.ObjectId
    
    
  4. 使用新帐户登录到 Azure。Sign in to Azure with the new account. 出现提示时,更改密码。Change the password when prompted.

  5. 使用新帐户登录到 https://portal.local.azurestack.external,以查看用户门户。Sign in to https://portal.local.azurestack.external with the new account to see the user portal.

后续步骤Next steps

在 AD FS 中添加 Azure Stack Hub 用户Add Azure Stack Hub users in AD FS