User Managed Identity support for Auditing SQL Azure database:
Published Sep 08 2022 12:58 AM 2,997 Views
Microsoft

 

Auditing for Azure SQL database has started supporting User Managed Identity. Auditing can be configured to Storage account using two authentication methods, managed identity and storage access keys. For managed identity you can use system managed identity or user managed identity. To know more about UMI in azure refer here 

 

To configure writing audit logs to a storage account, select Storage when you get to the Auditing section. Select the Azure storage account where logs will be saved, you can use two storage authentication types i.e., managed identity and storage access keys.  

For managed identity, we support system and user managed identity.

 

By default, it picks primary user identity that is assigned to the server, if there is no user identity then it will create system assigned identity and use it for authentication purpose. 

select the retention period by opening Advanced properties. Then click Save. Logs older than the retention period is deleted. 

 

 Note 

The user managed identity authentication type for enabling auditing to storage behind VNet/Firewall through Azure portal is not currently supported. 

 

 

SravaniSaluru_0-1662623732230.png

 

 

 

 

Review the identity blade for your Azure database, you can see there is one primary identity configured  

 

SravaniSaluru_1-1662623732234.png

 

 

 To configure Auditing using User managed Identity, follow the below steps  

 

  1. Create a user managed identity and assign it to the server (User-assigned managed identity in Azure AD for Azure SQL - Azure SQL Database & Azure SQL Managed In...) 
  2. Go to the desired storage account where auditing needs to send logs to and assign the 'Storage Blob Data Contributor' RBAC to the user managed identity previously assigned to the server.  
    Assign Azure roles using the Azure portal - Azure RBAC | Microsoft Docs 
  3. Only after the above-mentioned role is assigned to the user managed identity, enable auditing using the Storage Authentication Type as managed identity  

 If there is no user managed identity created, then by default it will use system identity. For system managed identity, when you configure auditing to storage account and select managed identity it will create system managed identity and grant required permissions to access storage account, no user action required.  

 

 

 

 

 

Co-Authors
Version history
Last update:
‎Jan 02 2023 03:33 AM
Updated by: