Add a new Azure Stack Hub user account in AAD
You create a user account in your Microsoft Entra tenant, by using the Azure portal or PowerShell.
Create user account using the Azure portal
You must have an Azure subscription to use the Azure portal.
Sign in to Azure.
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).
Select Microsoft Entra ID > Users > New user.
On the User page, fill out the required info.
- Name (required): The first and last name of the new user. For example, Mary Parker.
- User name (required): The user name of the new user. For example,
mary@contoso.com
. The domain part of the user name must use either the initial default domain name,<yourdomainname>.onmicrosoft.com
, or a custom domain name, such as contoso.com. - Profile: Optionally, you can add more info about the user. You can also add user info at a later time.
- Directory role: choose User.
- Check Show Password and copy the autogenerated password provided in the Password box. You'll need this password for the initial sign-in process.
- Select Create.
The user is created and added to your Microsoft Entra tenant.
- Sign in to the Azure portal with the new account. Change the password when prompted.
- Sign in to
https://portal.local.azurestack.external
with the new account to see the user portal.
Create a user account using PowerShell
If you don't have an Azure subscription, you can't use the Azure portal to add a tenant user account. In this case, you can use the Azure AD module for Windows PowerShell instead.
- Install the 64-bit version of the Microsoft Online Services Sign-in Assistant for IT Professionals RTW.
- Install the Microsoft Azure AD module for Windows PowerShell with these steps:
- Open an elevated Windows PowerShell command prompt (run Windows PowerShell as admin).
- Run the Install-Module MSOnline command.
- If you're prompted to install the NuGet provider, select Y and Enter.
- If you're prompted to install the module from PSGallery, select Y and Enter.
- Run the following cmdlets
# Provide the Azure AD credential.
$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
- Sign in to Azure with the new account. Change the password when prompted.
- Sign in to
https://portal.local.azurestack.external
with the new account to see the user portal.