15 49.0138 8.38624 1 0 4000 1 https://vladtalkstech.com 300 1
theme-sticky-logo-alt
Disable Power Platform Self Purchase Option

Step by Step: How to Disable Power Platform Self Service Purchasing in Office 365

1 Comment

On the 21st day of October 2019, Microsoft made public some very ambitious plans: Self-service purchasing for end-user for all Power Platform products (Power BI, Power Apps, Power Automate), enabled by default, and without the possibility for this to go trough an IT approval workflow, or even for IT to even disable the feature. As you might guess, admins were not too happy about this, and took to User Voice to ask Microsoft to enable a way for administrators to disable the Power Platform self service purchasing option on the tenant. Within only a few days, it got over 5,000 votes and Microsoft acted by releasing a PowerShell module allowing you to disable the functionality before it hits production with the new date of January 14th.

Disable Power Platform Self Service Purchasing

Disable Power Platform Self Service Purchasing in Office 365

The first thing we will need to do is to install a new PowerShell module called the MSCommerce PowerShell Module. You will also need to be either a Global Administrator or Billing Administrator. The MSCommerce PowerShell module is hosted on the PowerShell Gallery , making it easy for us to install and update. To install the module on a Windows 10 device simply open up PowerShell as an administrator and run the following command:

Install-Module -Name MSCommerce

You will get a few prompts asking you if you trust the install location, to which you must answer yes. If it’s the first time you install a module from the PowerShell Gallery, there might be some additional prompts you need to accept, but everything is straightforward.

Disable Power Platform Self Service Purchasing

After the installation is done, we need to connect by using the following cmdlet

Connect-MSCommerce

This will open a pop up as seen in the screenshot below, asking you for your username and password. Remember that this account must have either the Billing Administrator Role, or the Global Administrator roles.

Disable Power Platform Self Service Purchasing

Next up, we can view what our current policy settings are by running the following cmdlet:

Get-MSCommerceProductPolicies -PolicyId AllowSelfServicePurchase

The default settings, seen below, would be that the self-service purchasing is enabled on all three products.

Disable Power Platform Self Service Purchasing

You can turn off the options for users to buy their own licenses either for specific products, or for all three of them, it’s really up to you!

To disable self-service purchasing for Power Automate (Microsoft Flow) you could run the following script:

$product = Get-MSCommerceProductPolicies -PolicyId AllowSelfServicePurchase | where {$_.ProductName -match 'Power Automate'}

Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId $product.ProductID -Enabled $false
Disable Power Platform Self Service Purchasing

With a small change, you can do the same for Power Apps:

$product = Get-MSCommerceProductPolicies -PolicyId AllowSelfServicePurchase | where {$_.ProductName -match 'Power Apps'}

Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId $product.ProductID -Enabled $false

As well as for Power BI:

$product = Get-MSCommerceProductPolicies -PolicyId AllowSelfServicePurchase | where {$_.ProductName -match 'Power BI Pro'}

Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId $product.ProductID -Enabled $false

Another option, if you want to disable self-service purchasing for all of the products, you can also run this quick script:

$Products = Get-MSCommerceProductPolicies -PolicyId AllowSelfServicePurchase
foreach ($Product in $Products){
    Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId $Product.ProductID -Enabled $false
}

To validate the result, re-run the following cmdlet, and all of the services that you wanted to modify should now be Disabled as seen in the screenshot below. (I did save Power BI in this one as an example ).

Get-MSCommerceProductPolicies -PolicyId AllowSelfServicePurchase
Disable Power Platform Self Service Purchasing

Conclusion

Whether you like it or not, the self-service purchasing option will hit all commercial Office 365 tenants starting on January 14th 2020 with Power BI, but thanks to the strong response of the community, Office 365 Administrators can now disable that option for a single product, or for all of the products of the Power Platform.

It’s also important for any Office 365 Administrator out there to note that, like it or not, you need to learn PowerShell for Office 365! Even if you do not mange Virtual Machines and Windows Server anymore, PowerShell is a very important skill in every Office 365 Administrator’s tool belt and Microsoft does push a lot of configurations only via PowerShell! PowerShell knowledge is also required for any Microsoft 365 and Azure certification you might want to be interested, so again, super important to learn! If you don’t feel comfortable with PowerShell yet, you can always get a free Pluralsight Trial, and listen first to the Windows PowerShell: Essentials path to familiarize yourself with the basics of PowerShell in General, and afterwards you can dig deeper into PowerShell for Office 365 with this Pluralsight course.

Leave a comment and don’t forget to like the Vlad Talks Tech Page   on Facebook and to follow me on Twitter here  for the latest news and technical articles on SharePoint.  I am also a Pluralsight author, and you can view all the courses I created on my author page.
Previous Post
Black Friday Deals on Microsoft 365 Learning Material
Next Post
Delve Blogs Retirement deadlines extended!

1 Comment

  • December 5, 2019 at 12:38 am
    SAJID ALI

    Hi Vlad,

    Thank for the sharing. However, I was working on stated issue with our users and fortunately saw your article.

    It’s great to solve the issue.

    Regards

    Reply

Leave a Reply