Reputation: 21
I am able to connect my (.Net 6) Azure App to my Azure Sql Server by:
There are a lot of Azure CLI guides for doing this but the Azure Web UI can do a lot more now and the above steps work.
However, I need to connect to the same database from another Azure App. You can't make 2 identities the admin of the database so I tried to switch to using a User Assigned identity (that I created as part of my Resource Group) instead. The steps were:
It doesn't work. I think the Sql Connection isn't picking up the User Managed Id like it did for the System Managed Id when the app tries to log in to the database.
Any ideas?
Upvotes: 0
Views: 322
Reputation: 21
Ok one way of solving this is to create a group in AAD, put the Azure App System Id into it, then give it the admin rights in the Azure Sql Database. Then I can just add more Azure App System Ids into the group when I need to. I'd still like to know the steps or connection string tricks needed to let an (.Net 6) Azure App use a User Assigned identity.
Upvotes: 0