Skip to content

Commit dc8eca9

Browse files
authored
Update troubleshoot-user-creation-deletion-issues.md
1 parent 2e6e670 commit dc8eca9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

support/entra/entra-id/dir-dmns-obj/troubleshoot-user-creation-deletion-issues.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,13 @@ Content-type: application/json {
7676

7777
## [Microsoft Graph PowerShell](#tab/azure-powershell)
7878

79-
To add a user in Microsoft Graph PowerShell, run the [New-MgUser](/powershell/module/microsoft.graph.users/new-mguser?view=graph-powershell-1.0)) cmdlet:
79+
To add a user in Microsoft Graph PowerShell, run the [New-MgUser](/powershell/module/microsoft.graph.users/new-mguser?view=graph-powershell-1.0)) cmdlet. To run this command, you must connect to Microsoft Graph with at least the `User.ReadWrite.All` permission.
8080

8181
```powershell
8282
$PasswordProfile = @{
8383
Password = 'xWwvJ]6NMw+bWH-d'
8484
}
85+
Connect-MgGraph -Scopes "User.ReadWrite.All"
8586
New-MgUser -DisplayName 'Rene Magi' -PasswordProfile $PasswordProfile -AccountEnabled -MailNickName 'ReneMagi' -UserPrincipalName '[email protected]'
8687
```
8788

0 commit comments

Comments
 (0)