Update service plan provisioningStatus in user license

He, Erchuang/何 二创 141 Reputation points
2023-03-08T02:31:54.5+00:00

Hello, I need to change a service plan status (Disabled->Success) in the specified user license plan.

I don't want to clear which command is suitable for use. I have tried command "Update-MgUserLicenseDetail" at present. There is a problem in using it.
The execution process is as follows:

$skuId='xxx'
$servicePlanId='xxx'
$servicePlanName='xxx'
$licenseDetailsId='xxx' 
$servicePlans=@{AppliesTo="User"
                ProvisioningStatus="Success"
                ServicePlanId=$servicePlanId
                ServicePlanName=$servicePlanName}
$params=@{ServicePlans= $servicePlans
	    SkuId = $skuId}

Update-MgUserLicenseDetail -UserId 'xxx' -LicenseDetailsId $licenseDetailsId 
-BodyParameter $params

Command execution error message:Filtered searches against this resource are not supported.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,485 questions
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 36,496 Reputation points
    2023-03-08T10:35:46.88+00:00

    Hi @He, Erchuang/何 二创

    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.

    0 comments No comments

0 additional answers

Sort by: Most helpful