EF Core Connection to Azure SQL with Managed Identity

前端 未结 4 1286
日久生厌
日久生厌 2020-12-28 13:35

I am using EF Core to connect to a Azure SQL Database deployed to Azure App Services. I am using an access token (obtained via the Managed Identities) to connect to Azure SQ

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-28 14:33

    For those who still fall on the same problem, I've solved the problem by using a DbInterceptor so I can asynchronously get the token without blocking the application. I had opened an issue on EF Core repo but I've closed with the solution:

    https://github.com/dotnet/efcore/issues/21043

    I hope it help.

提交回复
热议问题