Hi JAmes, I added the -Debug switch. This is the output
Set-EntraUserPassword -ObjectID $em -Password $pwd -Debug
DEBUG: ============================ TRANSFORMATIONS ============================
DEBUG: Debug : True
DEBUG: =========================================================================
DEBUG: [CmdletBeginProcessing]: - Update-MgUser begin processing with parameterSet 'UpdateExpanded'.
DEBUG: [Authentication]: - AuthType: 'ManagedIdentity', TokenCredentialType: 'ManagedIdentity', ContextScope: 'Process', AppName: 'AzurePortal Console App'.
DEBUG: [Authentication]: - Scopes: [AuditLog.Read.All, Directory.ReadWrite.All, email, Group.ReadWrite.All, IdentityProvider.ReadWrite.All, openid, profile, User.Invite.All].
Confirm
Are you sure you want to perform this action?
Performing the operation "Update-MgUser_UpdateExpanded" on target "Call remote 'PATCH /users/{user-id}' operation".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
PATCH
Absolute Uri:
https://graph.microsoft.com/v1.0/users/johntest%40nwm.doe.gov
Headers:
User-Agent : PowerShell/7.4.5,EntraPowershell/0.17.0,Set-EntraUserPassword
FeatureFlag : 00000043
Cache-Control : no-store, no-cache
Accept-Encoding : gzip
SdkVersion : graph-powershell/2.15.0
client-request-id : cc542caf-32ac-4aba-9e1a-83f8d552ce1
Body:
{
"passwordProfile": {
"password": "H"
}
}
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
BadRequest
Headers:
Cache-Control : no-cache
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : 440307d9-c9af-4340-a8f6-3312fdd74955
client-request-id : cc542caf-32ac-4aba-9e1a-83f8d552ce18
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"West US","Slice":"E","Ring":"4","ScaleUnit":"002","RoleInstance":"BY3PEPF00028DCA"}}
x-ms-resource-unit : 1
Date : Mon, 21 Oct 2024 22:19:41 GM
Body:
{
"error": {
"code": "Request_BadRequest",
"message": "The specified password does not comply with password complexity requirements. Please provide a different password.",
"innerError": {
"date": "2024-10-21T22:19:42",
"request-id": "440307d9-c9af-4340-a8f6-3312fdd74955",
"client-request-id": "cc542caf-32ac-4aba-9e1a-83f8d552ce18"
}
}
}
Update-MgUser_UpdateExpanded: The specified password does not comply with password complexity requirements. Please provide a different password. Status: 400 (BadRequest) ErrorCode: Request_BadRequest Date:
2024-10-21T22:19:42 Headers: Cache-Control : no-cache Vary : Accept-Encoding Strict-Transport-Security : max-age=31536000
request-id : 440307d9-c9af-4340-a8f6-3312fdd74955 client-request-id : cc542caf-32ac-4aba-9e1a-83f8d552ce18 x-ms-ags-diagnostic :
{"ServerInfo":{"DataCenter":"West US","Slice":"E","Ring":"4","ScaleUnit":"002","RoleInstance":"BY3PEPF00028DCA"}} x-ms-resource-unit : 1 Date
: Mon, 21 Oct 2024 22:19:41 GM
DEBUG: [CmdletEndProcessing]: - Update-MgUser end processing.