When updating generated PowerShell/SDK clients (e.g., AutoRest v3 → v4), treat the generated model contract as authoritative: match namespaces/types and ensure request serialization shape matches what the REST service expects.
Do
String[], it will serialize as an array—AutoRest will not convert that into a hashtable/dictionary.Don’t
Example (identity shape change)
# AutoRest v4 style: array of ARM resource IDs
[Parameter(Mandatory=$false)]
[System.String[]] $UserAssignedIdentity
# SDK will serialize $UserAssignedIdentity as a JSON array.
# If the service still expects a dictionary/hashtable payload,
# update the service contract instead of trying to “fix” it in the cmdlet.
Use this checklist during migrations and related API interface work to avoid subtle request/response contract breaks and mismatched serialization payloads.