
Charanjit Singh (Partner) asked a question.
Hello,
We recently migrated to managed-identify DB connection.
The given connection string from the Data team is:
- <add connectionString="Server=REDACTED-sql.database.windows.net,1433;Database=REDACTED;Authentication=Active Directory Managed Identity;User Id=REDACTED;Encrypt=True;TrustServerCertificate=False;" providerName="Microsoft.Data.SqlClient" dbType="SqlAzure" name="Sitefinity" />
The Sitefinity app failed to start with the error message:
- Message: Telerik.OpenAccess.OpenAccessException: System.ArgumentException: Invalid value for key 'authentication'.
- at Telerik.OpenAccess.RT.Adonet2Generic.Impl.DBDriver.connect(ConnectionString connectionString, PropertySet driverProps, ConnectionPoolType poolType, LogEventStore pes)
- at OpenAccessRuntime.Relational.sql.SqlDriver.InitializeFor(ConnectionString connectionString, Boolean noConnect, PropertySet props, DBDriver& driver, Connection& conn, ConnectionPoolType poolType)
- at OpenAccessRuntime.Relational.RelationalStorageManagerFactory..ctor(StorageManagerFactoryBuilder b)
- at OpenAccessRuntime.storagemanager.StorageManagerFactoryBuilder.createSmfForURL() ---> System.ArgumentException: Invalid value for key 'authentication'.
- at Telerik.OpenAccess.RT.Adonet2Generic.Impl.DBDriver.connect(ConnectionString connectionString, PropertySet driverProps, ConnectionPoolType poolType, LogEventStore pes)
- at OpenAccessRuntime.Relational.sql.SqlDriver.InitializeFor(ConnectionString connectionString, Boolean noConnect, PropertySet props, DBDriver& driver, Connection& conn, ConnectionPoolType poolType)
- at OpenAccessRuntime.Relational.RelationalStorageManagerFactory..ctor(StorageManagerFactoryBuilder b)
- at OpenAccessRuntime.storagemanager.StorageManagerFactoryBuilder.createSmfForURL()
- --- End of inner exception stack trace ---
- at DynamicModule.ns.Wrapped_OpenAccessMetaDataProvider_ec665e4f2599486cb10c4a4d56ab78ac.Initialize(String providerName, NameValueCollection config, Type managerType)
- at Telerik.Sitefinity.Data.ManagerBase`1.InstantiateProvider(IDataProviderSettings providerSettings, Type providerType, ExceptionPolicyName policy, Type managerType)
- at Telerik.Sitefinity.Data.ManagerBase`1.InstantiateProvider(IDataProviderSettings providerSettings, ExceptionPolicyName policy, Type managerType)
- at Telerik.Sitefinity.Data.ManagerBase`1.ResolveProvider(String providerName, String dataSourceName)
- at Telerik.Sitefinity.Data.ManagerBase`1.SetProvider(String providerName, String transactionName)
- at Telerik.Sitefinity.Data.Metadata.MetadataManager..ctor()
Looks like the `Authentication=Active Directory Managed Identity` is not recognized/allowed by Sitefinity's base DB connector.
I can confirm that the new connection string works with the generic `System.Data.SqlClient` on our VM.
Any advice to resolve the issue please.
Thanks
I did find some additional guidance via Microsoft docs. Please review the below and make sure you have all the nuget packages, etc.
https://community.progress.com/s/article/advice-on-setting-up-a-managed-identity-on-azure-sql
https://learn.microsoft.com/en-us/azure/app-service/tutorial-connect-msi-sql-database?tabs=windowsclient%2Cef