Based on my testing, the Update-MgUserLicenseDetail
cmdlet doesn't seem to work, and Microsoft hasn't released a graph API endpoint associated with Update-MgUserLicenseDetail
cmdlet.
For this, I recommend that you open a support ticket to get help from the Microsoft product support team. You can raise a support ticket from:
http://aad.portal.azure.com or https://admin.microsoft.com/#/support/requests.
Hope this helps.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.