Azure Audit logs

Does anyone have some code that will search the Azure audit logs? I’m trying to set up a script to notify me when a new application gets registered in Azure. I’ve done some checking online, but documentation appears to be a bit sparse.



Import-Module -Name Az
Get-AzLog -StartTime ((Get-Date).AddDays(-1)) -EndTime (Get-Date) | `
Select -Property Level, EventTimestamp, Caller, ResourceGroupName, ResourceId -ExpandProperty Authorization