Will Predicate Expressions die with AzureRM Powershell ?

Thomas Poulsen 20 Reputation points

In Azure SQL we want to enable auditing with an audit policy that filters away events that was not produced by an employee/developer.

We found that we could achieve this using the AzureRM powershell module.

Set-AzSqlServerAudit `
 -ResourceGroupName "someRG" `
 -ServerName "someServer" `
 -BlobStorageTargetState "Enabled" `
 -StorageAccountResourceId "someStorageAccountResourceId" `
 -PredicateExpression "sqlserver.server_principal_name LIKE '%@domain.com'"

However AzureRM deprecates in feb. 2024 and the Predicate Expression does not exist in the Az module.

While we can setup the audit policy right now then we are in doubt if the policy will still function after feb 2024 ?

It is unclear at the moment. if the Azure CLI team intends to bring predicate expression to the Az module. We have made a request to them.

So the main question for us is if we can expect the Predicate Expressions setup before feb 2024 to still function after feb. 2024 ?

Azure SQL Database
0 comments No comments
{count} votes

Accepted answer
  1. Sedat SALMAN 13,190 Reputation points

    Although AzureRM PowerShell module is being deprecated in favor of the Az PowerShell module, the functionalities provided by AzureRM, such as the predicate expressions you are using, will not necessarily cease to work after February 2024. The deprecation of AzureRM simply means that it will no longer receive updates and support from Microsoft, but any resources and configurations that you have already set up using AzureRM should continue to function.

    That being said, it is generally recommended to migrate to the newer Az PowerShell module to ensure that you have access to the latest features, improvements, and support. It's worth noting that the lack of predicate expressions in the Az module is a limitation, and it is not clear if or when this feature will be added. You have done well to raise this concern in the GitHub issue you mentioned, as it will help the Azure CLI team prioritize the feature request.

    In summary, your predicate expressions set up before February 2024 should continue to function even after the deprecation of AzureRM. However, it is recommended to monitor the GitHub issue you created to stay informed about any updates or changes related to this functionality in the Az PowerShell module.

    2 people found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Oury Ba-MSFT 16,986 Reputation points Microsoft Employee

    Thomas Poulsen Thank you for reaching out.

    Adding on top of Sedat SALMAN's answer.

    The Az cmdlet has the -PredicateExpression  parameter as your command shows. Azure CLI is a different command line tool. 

    The best move for customers using AzureRM module is to switch to the Az module following the guidance provided here: https://learn.microsoft.com/en-us/powershell/azure/migrate-from-azurerm-to-az?view=azps-9.7.1

    The settings applied with a version of a tool are not related to the lifecycle of a product.



    1 person found this answer helpful.