Reputation: 4405
I'm unable to search for and assign an Event Grid SAMI to a Storage Account. It doesn't appear when searched for unless I select Users
instead of Managed Identity
.
1. Azure Storage account (ADLS Gen2 w/ hierarchical namespaces)
stgstackoverflowtest
2. Create a new Queue
stgqueue
3. Create New Event and Subscription
stgstackoverflowtest
stgqueue
4. Enable System Assigned Managed Identity (SAMI) for EventGrid system topic
5. Add SAMI as Owner to Storage Account
Upvotes: 0
Views: 1742
Reputation: 6227
You can do it from within the Event Grid Topic resource. Go to the blade Identity
and then click the button Azure role assigments
. From there it will show the way itself.
Alternatively Powershell and the Azure CLI commands would also work. An example using the CLI:
az role assignment create `
--assignee <GUID of the managed identity> `
--role 'Storage Queue Data Contributor' `
--scope /subscriptions/<subscription>/resourceGroups/<resourcegroup>/providers/Microsoft.Storage/storageAccounts/<storage>
Upvotes: 1