Azure / Azure/azure-cli

Insufficient read or write permissions on storage account

Open
#15,070 5 comments 1 reaction 0 assignees View on GitHub
act-codegen-extensibility-squad customer-reported Service Attention SQL
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

Tried enabling sql auditing using cli, it failed with error "Insufficient read or write permissions on storage account ''"

While the corresponding powershell command worked.

**AZ CLI Command:** [Did not work]

az sql db audit-policy update --name --resource-group --server --retention-days 30 --storage-account --state Enabled --action SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP

**POWERSHELL Command** [Worked]

Set-AzSqlDatabaseAudit -ResourceGroupName "" -ServerName "" -DatabaseName "" -BlobStorageTargetState Enabled -StorageAccountResourceId "/subscriptions/***************/resourceGroups//providers/Microsoft.Storage/storageAccounts/" -AuditActionGroup SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP -RetentionInDays 30

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: 4f158476-a880-5ae8-8b05-dc0dbe37b4a0
* Version Independent ID: c02a5c94-c6e5-e93f-1639-cde7b65f5702
* Content: [az sql db audit-policy](https://docs.microsoft.com/en-us/cli/azure/sql/db/audit-policy?view=azure-cli-latest)
* Content Source: [src/azure-cli/azure/cli/command_modules/sql/_help.py](https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/azure/cli/command_modules/sql/_help.py)
* Service: **sql-database**
* GitHub Login: @rloutlaw
* Microsoft Alias: **routlaw**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.