How block user from creating Azure Subscription

365 views Asked by At

Currently users from our organization able to create free Azure trial, pay as you go and Azure student subscription, which makes a lot subscriptions in our tenant.

We want to disable the users from creating these subscriptions

enter image description here

1

There are 1 answers

4
Venkat V On

How block user from creating Azure Subscription

If you want to prevent a user from creating an Azure subscription in Azure AD tenant, you can use below PowerShell script to disable AllowSelfServicePurchase for all products. but users won't be able to renew their trial accounts when AllowSelfServicePurchase is $false.

    Install-Module -Name MSCommerce -force
    Import-Module -Name MSCommerce  
    Connect-MSCommerce 
    $products = Get-MSCommerceProductPolicies -PolicyId AllowSelfServicePurchase | Where { $_.PolicyValue -eq "Enabled"}
    foreach ($p in $products){
    Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId $p.ProductId -Enabled $False
    }

Response:

enter image description here

Refer Disable AllowSelfServicePurchase on Q&A by @ LeonPavesic

Prevent standard users from creating subscriptions in Azure by Marilee Turscak-MSFT