Azure DW Vulnerability Assessment Permissions
Published Aug 13 2019 08:09 AM 2,090 Views
Microsoft

In the event that you have enabled  the Advanced Data security feature in Azure Data Warehouse and you have configured the Vulnerability assessment successfully and you require a non Subscription administrator to view the report data you have to assign permissions in order to do so.

 

The permissions which are required are at a SQL level and at a Storage account level these can be easily assigned through RBAC roles within Azure. 

- SQL Server Admin Role or SQL Security Manager Role 

- Reader and Data Access role at storage level

 

You could use a script like the following which creates a custom Role Script that assigns the SQL Security Manager role by default and grants the actions which the Reader and Data Access Built in role grants you, thus enabling you to view the Assessment once you have been granted the Custom created role called "DW Vulnerability Assessment" 

 

Connect-AzureRmAccount
Select-AzureRmSubscription '......'
$role = Get-AzureRmRoleDefinition -Name "SQL Security Manager"
$role.Name = "DW Vulnerability Assessment"
$role.Description = "Grants you permission to view Vulnerability Assessment"
$role.IsCustom = $true
$role.Actions.Add("Microsoft.Storage/storageAccounts/listKeys/action");
$role.Actions.Add("Microsoft.Storage/storageAccounts/ListAccountSas/action");
$role.Actions.Add("Microsoft.Storage/storageAccounts/read");
$role.AssignableScopes.Clear()
$role.AssignableScopes.Add("/subscriptions/xxxxxx-xxxx-xxxx-xxx-xxxxxxxxx")
New-AzureRmRoleDefinition $role

 

The scope above is for the entire subscription and all storage accounts and SQL Instances, if you want to limit this grant the permissions at a resource level and not subscription level. 

 

 

Version history
Last update:
‎Apr 20 2020 01:40 PM
Updated by: