Skip to content
AZ-08 Draft

"Auditing is off" false negative on Azure SQL

Get-AzSqlServerAudit only checks the server. A database can have auditing on even when the server doesn't.

Draft. The fix is known and correct, but we're still writing up the full step-by-step.

Symptom

A review script reports auditing as off, but the portal shows auditing enabled on the database.

Cause

Azure SQL auditing can be set at the server level, the database level, or both. Get-AzSqlServerAudit only reports the server level.

Fix

Check both:

Get-AzSqlServerAudit   -ResourceGroupName $rg -ServerName $server
Get-AzSqlDatabaseAudit -ResourceGroupName $rg -ServerName $server -DatabaseName $db

Treat auditing as enabled if either level is on, and record which one.

This guide is being expanded with full steps.

Seeing this in your environment?

We can check for this, and everything around it, as part of an audit.

Ask us about AZ-08

Find out what's really going on in your tenant.

Tell us what you run and what's worrying you. We'll recommend the right audit, and tell you honestly if you don't need one.