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: ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results