Turn Off Self-Service Purchases in Microsoft 365


Microsoft 365 has a route for users to buy their own products rather than products purchased and licenced by the company. This blog outlines how to turn this off.

Install the MSCommerce PowerShell module with:

Install-Module MSCommerce

Then connect to the MSCommerce endpoint with:

Connect-MSCommerce 

Then login with the administrator account.

List all the products you are able to purchase “self-service” and see the state of these products, that is Enabled or Disabled. Do this with Get-MSCommerceProductPolicies -PolicyId AllowSelfServicePurchase – you can see them all disabled in the below picture, but the default is they would all be enabled.

Get-MSCommerceProductPolicies -PolicyId AllowSelfServicePurchase

The list of products as of the date of writing this blog in Sept 2021 totals 12 products. As new products are added you will need to come in here and disable them as they will be added in an enabled for self-service purchase state.

To turn all these products off, just run the following PowerShell:

Get-MSCommerceProductPolicies -PolicyId AllowSelfServicePurchase | %{Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId $_.ProductId -Enabled $False}

Its possible that the above have stopped working by 2023 as the data returned from the MSCommerce module is not an object in PowerShell and so cannot be manipulated. Whilst this is the case, each individual product needs disabling following the steps below.

To disable some but not all of the products, you need to disable just those you are interested in. To do this, run the following MSCommerce PowerShell code to display all the products

Get-MSCommerceProductPolicies -PolicyId AllowSelfServicePurchase

Then disable selected products using the ProductID from what you see in the output above, Microsoft 365 Enterprise being shown as the example ProductID

Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0HHS9 -Enabled $False

Therefore, if running these cmdlets in 2023 you might need to run the following list to disable “all” the products listed (Aug 2023, more products will be added)

Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0LH3L -Enabled $False #Power Automate per user
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0LH2H -Enabled $False #Power Apps per user
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0H9MP -Enabled $False #Power BI Pro
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0HDB1 -Enabled $False #Project Plan 1
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0HDB0 -Enabled $False #Project Plan 3
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0HD33 -Enabled $False #Visio Plan 1
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0HD32 -Enabled $False #Visio Plan 2
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0KXG6 -Enabled $False #Power Automate RPA
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0H6RP -Enabled $False #Power BI Premium per user
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0HHS9 -Enabled $False #Windows 365 Enterprise
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0J203 -Enabled $False #Windows 365 Business
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0HX99 -Enabled $False #Windows 365 Business with Windows Hybrid Benefit
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0HVZG -Enabled $False #Viva Learning
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0LH3N -Enabled $False #Dynamics 365 Marketing
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0LHWP -Enabled $False #Dynamics 365 Marketing Attach
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0LH05 -Enabled $False #Microsoft 365 F3
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0LHVK -Enabled $False #Dynamics 365 Marketing Additional Application
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0LHWM -Enabled $False #Dynamics 365 Marketing Additional Non-Prod Application
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0PW0V -Enabled $False #Viva Goals
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0LSGZ -Enabled $False #Power Automate Per User with Attended RPA Plan
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0J1FV -Enabled $False #Teams Exploratory
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0S3X1 -Enabled $False #Python On Excel
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0RM8K -Enabled $False #Teams Premium

One response to “Turn Off Self-Service Purchases in Microsoft 365”

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.