Microsoft Entra Suite Tech Accelerator
Aug 14 2024, 07:00 AM - 09:30 AM (PDT)
Microsoft Tech Community
Switch to the New Defender for Resource Manager Pricing Plan
Published Dec 05 2023 03:13 PM 2,970 Views
Microsoft

Introduction

Hi folks! My name is Felipe Binotto, Cloud Solution Architect, based in Australia.

 

In case you missed it, a new pricing plan has been announced for Microsoft Defender for Resource Manager.

 

The legacy pricing plan (per-API call) is priced at $4 per 1M API Calls, which can become a bit expensive if there is a lot going on in your subscriptions.

 

fbinotto_0-1701817708030.png

 

The new pricing plan (per-subscription) is priced at $5 per subscription per month.

 

fbinotto_1-1701817708032.png

 

We have made available a workbook which provides a cost estimation for all the Defender plans across all your subscriptions.

 

For more information visit this link.

 

This new pricing plan is huge for most enterprise customers. This has the potential to reduce your Microsoft Defender for Resource Manager cost dramatically.

 

However, make sure you make at least 1.25M API calls per month in the subscription you are looking to switch for the new pricing plan. Otherwise, you will end up paying more for the same service.

 

Switch to the new pricing plan

The easiest way is to switch from the Azure Portal. However, if you have a large number of subscriptions this activity can be super boring!

Currently, there is no native PowerShell cmdlets which can help with the switch, but we can leverage the Microsoft Defender for Cloud REST API.

 

The script

To make your life easier, I have already developed the script to switch the plan. This script will switch all subscriptions to the new plan. Adapt it to your requirements.

 

 

 

Connect-AzAccount

foreach($subId in (Get-AzSubscription | ? State -eq "Enabled").Id){

    $payload = @"
    {
    "properties": {
    "pricingTier": "Standard",
    "subPlan": "PerSubscription"
    }
    }
"@

    $result = (Invoke-AzRestMethod -SubscriptionId $subId -Method Get -ResourceProviderName 'Microsoft.Security' -ApiVersion 2022-03-01 -Name Arm -ResourceType pricings).content | ConvertFrom-Json

    if($result.properties.pricingtier -eq "Free"){

        Write-Host "Subscription $subId is on the Free pricing tier"

    }
    else{

        Invoke-AzRestMethod -SubscriptionId $subId -Method Put -ResourceProviderName 'Microsoft.Security' -ApiVersion 2022-03-01 -Name Arm -ResourceType pricings -Payload $payload

        Write-Host "Subscription $subId is on the Standard pricing tier and has been converted to new pricing model"

    }
}

 

 

 

Conclusion

The new pricing model can provide immediate huge savings and it is very simple to implement. This is one of the easiest ways to save on your Azure spendings.

 

Check my other post on savings for the Defender for Storage Accounts.

 

I hope this was informative for you and thanks for reading.

 

 

Disclaimer

The sample scripts are not supported under any Microsoft standard support program or service. The sample scripts are provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.

 

Co-Authors
Version history
Last update:
‎Jan 07 2024 09:43 AM
Updated by: