SOLVED

Disable AllowSelfServicePurchase (MSCommerceProductPolicy)

Copper Contributor

Hello,

 

We have decided that we want to block users in our tenant from subscribing to trials and such through Self-Service Purchases (SSP).

 

We can do that by using the following code:

 

 

 

 

Install-Module -Name MSCommerce -Scope CurrentUser

Import-Module -Name MSCommerce

Connect-MSCommerce #log in here

$products = Get-MSCommerceProductPolicies -PolicyId AllowSelfServicePurchase | Where { $_.PolicyValue -eq "Enabled"}

foreach ($p in $products)

{

Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId $p.ProductId -Enabled $False

}

 

 

 

 

 

But my question is that if you set the AllowSelfServicePurchase to $false - will it block users from their current activated trials? Like will it have a retroactive affect? Or will it just block the future sign-ups?


Thanks in advance.

1 Reply
best response confirmed by securebeam (Copper Contributor)
Solution

Hi @securebeam,

Setting AllowSelfServicePurchase to $false will only block users from signing up for new trials. It will not have any effect on existing trials that are already activated.

This is because trials are considered to be active contracts, and Microsoft cannot unilaterally break those contracts. However, once a trial expires, the user will not be able to renew it if AllowSelfServicePurchase is set to $false.

If you want to prevent users from renewing existing trials, you will need to manually disable them. You can do this by going to the Subscriptions page in the Microsoft Admin Center and disabling the trials for each user.

Here are the steps on how to disable a trial subscription:

  1. Go to the Subscriptions page in the Microsoft Admin Center.
  2. Click on the Trials tab.
  3. Find the trial subscription that you want to disable and click on it.
  4. Click on the Disable button.
  5. Click on the Yes button to confirm.

Once you have disabled a trial subscription, the user will not be able to renew it. 

Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.


If the post was useful in other ways, please consider giving it Like.


Kindest regards,


Leon Pavesic

1 best response

Accepted Solutions
best response confirmed by securebeam (Copper Contributor)
Solution

Hi @securebeam,

Setting AllowSelfServicePurchase to $false will only block users from signing up for new trials. It will not have any effect on existing trials that are already activated.

This is because trials are considered to be active contracts, and Microsoft cannot unilaterally break those contracts. However, once a trial expires, the user will not be able to renew it if AllowSelfServicePurchase is set to $false.

If you want to prevent users from renewing existing trials, you will need to manually disable them. You can do this by going to the Subscriptions page in the Microsoft Admin Center and disabling the trials for each user.

Here are the steps on how to disable a trial subscription:

  1. Go to the Subscriptions page in the Microsoft Admin Center.
  2. Click on the Trials tab.
  3. Find the trial subscription that you want to disable and click on it.
  4. Click on the Disable button.
  5. Click on the Yes button to confirm.

Once you have disabled a trial subscription, the user will not be able to renew it. 

Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.


If the post was useful in other ways, please consider giving it Like.


Kindest regards,


Leon Pavesic

View solution in original post