1
votes

Can someone please help me with the following quick question.

I have set up a Premium Key Vault I have setup a storage account (Standard_LRS)

I am now trying to enable logging for my key vault (following a section of the following https://docs.microsoft.com/en-us/azure/key-vault/key-vault-logging )

After getting my Key Vault and Storage Account into variables I try the following PowerShell command

Set-AzureRmDiagnosticSetting -ResourceId $kv.ResourceId 
    -StorageAccountId $sa.Id -Enabled $true -Categories AuditEvent

However when I run the above command I get the following error

Set-AzureRmDiagnosticSetting : Log category 'AuditEvents' is not available At line:1 char:1 + Set-AzureRmDiagnosticSetting -ResourceId $kv.ResourceId -StorageAccou ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Set-AzureRmDiagnosticSetting], ArgumentException + FullyQualifiedErrorId : Microsoft.Azure.Commands.Insights.Diagnostics.SetAzureRmDiagnosticSettingCommand

Any ideas please

1

1 Answers

0
votes

Not sure if this is still valid, but i ran in to this, and noticed the category 'AuditEvent' is changed to 'Audit' whan changing this, everything works as predicted.