1 | initial version |
A user-assigned managed identity can be used to establish a connection between Azure App Service and Azure SQL in the following steps:
Here is an example connection string:
Server=tcp:<your_db_server_name>.database.windows.net,1433;Initial Catalog=<your_db_name>;Persist Security Info=False;User ID=<your_managed_identity_name>@<your_tenant>.onmicrosoft.com;Password=XXX;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;
Note that the "User ID" field includes the name of the managed identity and the tenant ID concatenated with "@". The password is not required since the managed identity is used for authentication.
With these steps completed, the App Service will be able to establish a secure connection to the Azure SQL without the need for any additional credentials.