You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: azure-stack/operator/azure-stack-add-new-user-aad.md
+9-23Lines changed: 9 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Learn how to create a user account in Microsoft Entra ID, so you ca
4
4
author: sethmanheim
5
5
ms.topic: article
6
6
ms.custom:
7
-
- has-azure-ad-ps-ref
7
+
- no-azure-ad-ps-ref
8
8
ms.date: 08/15/2024
9
9
ms.author: sethm
10
10
ms.reviewer: thoroet
@@ -46,41 +46,27 @@ You must have an Azure subscription to use the Azure portal.
46
46
47
47
## Create a user account using PowerShell
48
48
49
-
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.
49
+
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 Microsoft Graph module for Windows PowerShell instead.
50
50
51
-
[!INCLUDE [Azure AD PowerShell deprecation note](~/../azure-stack/reusable-content/msgraph-powershell/includes/aad-powershell-deprecation-note.md)]
52
-
53
-
1. Install the Microsoft Azure AD module for Windows PowerShell with these steps:
51
+
1. Install the Microsoft Graph PowerShell SDK for Windows PowerShell with these steps:
54
52
55
53
- Open an elevated Windows PowerShell command prompt (run Windows PowerShell as admin).
56
-
- Run the **Install-Module AzureAD** command.
54
+
- Run the **Install-Module Microsoft.Graph** command.
57
55
- If you're prompted to install the NuGet provider, select **Y** and **Enter**.
58
56
- If you're prompted to install the module from PSGallery, select **Y** and **Enter**.
59
57
60
-
1. Run the following cmdlets to sign in and create the user account:
61
-
62
-
- If your directory **doesn't require** multi-factor authentication, use this sequence to authenticate:
63
-
64
-
```powershell
65
-
# Wait for the prompt, then sign in using your Azure AD credentials
66
-
$aadcred = get-credential
67
-
Connect-AzureAD -credential $aadcred
68
-
```
69
-
70
-
- If your directory **requires** multi-factor authentication, use this sequence to authenticate:
58
+
1. Run the following cmdlet to connect.
71
59
72
60
```powershell
73
-
# Wait for the prompt, then sign in using your Azure AD credentials and MFA code
74
-
Connect-AzureAD -Confirm
61
+
Connect-MgGraph -Scopes 'User.ReadWrite.All'
75
62
```
76
63
77
-
- Now that you've authenticated, complete the sequence by adding the new user:
64
+
1. After you connect, complete the sequence by adding the new user:
78
65
79
66
```powershell
80
67
# Create the new user account (be sure to replace all <placeholder> values first)
0 commit comments