In This Article |
Microsoft provides self-service purchasing to give an organization's users a chance to try out new technologies and develop solutions that ultimately benefit their company. This includes purchasing new products with a credit card, or starting a free trial. Additionally, the purchaser has access to a limited view of the Microsoft 365 Admin Center where they can assign the product's licenses to other people in the organization.
Central procurement and IT teams have visibility to all users who buy and deploy self-service purchase solutions through the Microsoft 365 Admin Center. Additionally, Admins can turn off self-service purchasing on a per product basis using PowerShell.
This article covers the process to turn off self-service purchasing for all products, or for an individual product.
Open a PowerShell window and run the following command to install the MSCommerce module:
Install-Module -Name MSCommerce -Scope CurrentUser |
If the MSCommerce Powershell module is already installed, use the following command to update the module:
Update-Module -Name MSCommerce |
Run the below commands to import the MSCommerce module and connect to the service:
# Import the MSCommerce module Import-Module -Name MSCommerce # Connect to the MSCommerce service Connect-MSCommerce |
Run the below command to view the status of each product.
# View the status of all self-service products Get-MSCommerceProductPolicies -PolicyId AllowSelfServicePurchase |
NOTE Disabling the purchasing of self-service products will only block users from purchasing new products, or signing up for new trials. It will not have any effect on existing purchases or trials that are already activated. |
Use the following commands to disabled self-service purchasing for a product. On Line 2 update the Product ID you wish to disable.
# Product ID $ProductID = "CFQ7TTC0MM8R" # Disable self-service purchasing for the product Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId $ProductID -Enabled $false |
Use the following commands to enable self-service purchasing for a product. On Line 2 update the Product ID you wish to enable.
# Product ID $ProductID = "CFQ7TTC0MM8R" # Disable self-service purchasing for the product Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId $ProductID -Enabled $true |
To disable all self-service products, use the following PowerShell:
# Add all product data to a variable $AllProducts = Get-MSCommerceProductPolicies -PolicyId AllowSelfServicePurchase # Iterate through each product and disable self-service purchasing ForEach ($Product in $AllProducts) { If ($Product.PolicyValue -eq "Enabled") { Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId $Product.ProductID -Enabled $false } } |