Blog Post

Core Infrastructure and Security Blog
3 MIN READ

Switch to the New Defender for Storage Pricing Plan

fbinotto's avatar
fbinotto
Icon for Microsoft rankMicrosoft
Jan 09, 2023

 

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

If you missed, a new pricing plan has been announced for Microsoft Defender for Storage.

The legacy pricing plan (per-transaction) is priced at $0.02 per 10K transactions, which can become a bit expensive if the Storage Account has a very large number of transactions.

 

 

The new pricing plan (per-storage-account) is priced at $10 per storage account which includes 73M transactions. Storage Accounts exceeding 73M transactions will be charged $0.1492 per 1M transactions.

 

 

We have made available a workbook which can scan all your storage accounts and provide the pricing for the legacy and for the new pricing plans.

For more information visit this link.

 

Advantages

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

The following is an example of the workbook displaying the cost for the new pricing plan across all the storage accounts enabled for Defender for Storage Account.

 

 

And the following is an example of the same storage accounts in the legacy pricing plan.

 

 

Huge savings!!!

 

Disadvantages

Storage Accounts with less than 4.5M transactions per month will not benefit from the new plan and may continue in the per-transaction plan.

The new pricing plan does not support excluding Storage Accounts from Defender for Storage protection. It is enabled at the subscription level and all Storage Accounts under that subscription are switched to the new plan. Refer to the FAQ.

For more information on how the exclusions work, refer to this link.

 

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.

For information about all the options to do the switch, refer to this link.

 

The script

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

First step before your run the script is to connect to Azure using the Connect-AzAccount cmdlet.

 

 

 

 

 

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

    $payload = @"

    {

    "properties": {
    "pricingTier": "Standard",
    "subPlan": "PerStorageAccount"

    }
    }

"@
    $result = (Invoke-AzRestMethod -SubscriptionId $subId -Method Get -ResourceProviderName 'Microsoft.Security' -ApiVersion 2022-03-01 -Name StorageAccounts -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 StorageAccounts -ResourceType pricings -Payload $payload

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

 

 

 

 

 

Conclusion

Download the workbook now and evaluate how much are your potential savings. This is one of the easiest ways to save on your Azure spendings.

 

I hope this was informative to you and thanks for reading. Happy new year!

 

 

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.

Updated Feb 23, 2023
Version 4.0

9 Comments

  • Hi azuredudett 

     

    I don't think there is a documentation on this but it is just math.

     

    4.5M transactions costs roughly $10 which is the price for the per-storage plan. Therefore, if your storage account has less than 4.5M transactions and you switch to the new plan, you would by paying more than in your old plan.

     

    Hope this makes sense.

     

    Thanks

  • azuredudett's avatar
    azuredudett
    Copper Contributor

    Good day fbinotto  - I have not seem the limitation of "Storage Accounts with less than 4.5M transactions per month will not benefit from the new plan and may continue in the per-transaction plan." documented anywhere. Can you provide some references ?

    From all online articles it indices

    • First 73Mil transactions per month are covered under the $10/month/storage account OR [ $0.0134 per storage account/hour] https://learn.microsoft.com/en-us/azure/storage/common/azure-defender-storage-configure?tabs=enable-subscription#availability
    • Anything exceeding 73M will be charged $0.1492 for every 1 million transactions that exceed the threshold

    At a basic level, the expectation is once you are within the 73M you are covered at the $10 rate per SA, but the caveat you've mentioned implies you can be 'opted' out from that rate.

     

    Please clarify

  • Thanks for this workbook, it works well. Looks like our Defender for Storage costs will increase by 154% if we switch over to the new pricing plan. :unamused:

  • SalahKhatri's avatar
    SalahKhatri
    Copper Contributor

    Hi,

     

    Just a suggestion, to make is easier for other readers, can you please change the wording from storage accounts to subscriptions so other can take the benefit and will not look here and there like me, most of the persons will not go to the post comments and review the comments to know.

     

    Thanks 

  • SalahKhatri you are right, I should have said subscriptions instead of Storage Accounts. I work with customers which have hundreds of subscriptions and therefore it would still be a boring task to go through all those subscriptions switching the plan.

     

    So, to clarify, the new pricing plan is applied at the subscription level and all storage accounts under that subscription will switch to the new pricing plan.

  • SalahKhatri's avatar
    SalahKhatri
    Copper Contributor

    Hi,

     

    Great article, while reading the article i was a little bit confused, under Disadvantages it is mentioned that "The new pricing plan does not support excluding Storage Accounts from Defender for Storage protection. It is enabled at the subscription level and all Storage Accounts under that subscription are switched to the new plan" under switch to the new pricing plan it is mentioned "if you have a large number of Storage Accounts this activity can be super boring!"

    it has put me in a confusion, because in one side we are saying it is done on the subscription level on the other side we are saying if you have a large number of Storage Accounts then run the script, if it is done per subscription then even if customer has 1000 storage accounts in a subscription if he has enabled a new pricing plan on a subscription then all 1000 storage accounts in the same subscription will be using new pricing plan, may be i might not have understood correctly, may be it needs to be enabled on a storage account level not subscription level.

     

    Thanks