Has anyone used Umbraco 7 (or 8) using Azure Managed Identity SQL access? This eliminates UID/PWD for SQL Access. Need to add get token code somewhere...
(9.4.3) I'm getting "System.TimeoutException: Cannot acquire MainDom" when trying to use a connection string without user id/password, i.e. app service configured as a managed identity in Azure. Is this case not supported? Which version of Microsoft.Data.SqlClient is referenced in Umbraco 9.4.3? I can't find out.
Johan (or anyone??), can you provide any instructions on how you made this work? Or even sample code? I can connect fine with standard connection string but as soon as I drop in the managed identity, it errors out. Is there special additions to the appsettings.json and/or other files (startup.cs, etc.)? I've already added Azure.Identity nuget package. FYI, I'm using Umbraco 11
Enable system managed identity on your app service.
You also need to go into your SQL server instance and add role
assignments for your app service managed identity as Contributor in
the IAM blade.
Last, I don't think this is relevant to you but I have a vnet with a subnet for my app service, and the subnet is delegated to Microsoft.Web/serverFarms, and it has these service endpoints enabled: Microsoft.Web, Microsoft.Sql.
Azure Managed Identity SQL access
Has anyone used Umbraco 7 (or 8) using Azure Managed Identity SQL access? This eliminates UID/PWD for SQL Access. Need to add get token code somewhere...
Yes, this is possible and works relatively well. The setup / configuration is a bit complex but is detailed in this documentation from Microsoft:
https://docs.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-connect-msi
(9.4.3) I'm getting "System.TimeoutException: Cannot acquire MainDom" when trying to use a connection string without user id/password, i.e. app service configured as a managed identity in Azure. Is this case not supported? Which version of Microsoft.Data.SqlClient is referenced in Umbraco 9.4.3? I can't find out.
Hi Chris
Have you managed to use that article to get this working for U8?
Jules
After upgrading to Umbraco 10, this now works :)
Hi bemokraig
I am also looking at getting Umbraco 8 SQL access working with Azure Managed Identities.
Did you have any success doing this?
Regards
Jules
Johan (or anyone??), can you provide any instructions on how you made this work? Or even sample code? I can connect fine with standard connection string but as soon as I drop in the managed identity, it errors out. Is there special additions to the appsettings.json and/or other files (startup.cs, etc.)? I've already added Azure.Identity nuget package. FYI, I'm using Umbraco 11
@Robert
I changed my connection string from user/pass to managed identity:
Last, I don't think this is relevant to you but I have a vnet with a subnet for my app service, and the subnet is delegated to Microsoft.Web/serverFarms, and it has these service endpoints enabled: Microsoft.Web, Microsoft.Sql.
Hope it helps!
I updated the connection string with Authentication=Active Directory Managed Identity, but still getting the below error:
-> Umbraco.Core.Exceptions.BootFailedException: Boot failed.
-> System.TimeoutException: Cannot acquire MainDom at Umbraco.Core.Runtime.MainDom.Acquire() at System.Threading.LazyInitializer.EnsureInitializedCore[T](T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory) at Umbraco.Core.Runtime.MainDom.get_IsMainDom() at Umbraco.Core.Runtime.CoreRuntime.AcquireMainDom(IMainDom mainDom) at Umbraco.Core.Runtime.CoreRuntime.Boot(IRegister register, DisposableTimer timer)
Any help would be greatly appreciated.
is working on a reply...