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.

3 Replies
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

@LeonPavesic 

Why doesn't M$ provide enterprise tenants the ability to turn off Self Service purchasing like they do for Governments and Education subscriptions?  This is money grab and undermines enterprise organizations.

Did you try to change the Default policy using either
Set-MSCommercePolicy -PolicyID AllowSelfServicePurchase -Enabled $False
or
Update-MSCommercePolicy -PolicyID AllowSelfServicePurchase -Enabled $False

I don't think we should have to keep changing individual Policy ID every time MS decides to release another Product.
I'd rather set the Default value returned from Get-MSCOmmercPolicy -PolicyId AllowSelfServicePurchase | Format-List
But the above commands return error as it is not a command in the Module.
Help MSCommerce only has a few commands.
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