In Microsoft.Graph PowerShell SDK version 2.26.1, the Set-MgUserLicense cmdlet is broken. Even when following the documented syntax with -RemoveLicenses @(), the command fails with the error: ...