Grant SQL managed identity to Storage Blob Data Contributor role

In some scenarios like this you need to grant SQL managed identity Storage Blob Data Contributor role on the Storage account, for doing this you need to create the storage account first, then from the left blade choose “Access Control (IAM)” and “Add role assignment” like the below screenshot.

Use IAM to grant SQL managed identity

From the Role list choose whatever you need, in my case I have to “Storage Blob Data Contributor” click on “Selected role” button then “Next”. You’ll have the page like the following screenshot.

Choose Managed identity and click on the “+Select members”, then from the Managed identity select SQL Server, as you see I only have one SQL Server, choose the server that you want and click on “Select” button.

Select SQL Server from right side

Now if you go to “Access Control (IAM)” You can see you have assigned the SQL Server to the Storage blob data contributor.

After confirmed you have to see the lust like this

What if I could not see my SQL Server list in the Managed identity in last step?

Use the following command in PowerShell, use -AssignIdentity parameter in Cloud PowerShell, see the refereal link here

Set-AzSqlServer -AssignIdentity -ResourceGroupName 'ResourceGroup01' -ServerName 'Server01' 

After executed the command in PowerShell then try the previous step, You’ll have the server list in your Managed Identity list.