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.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-07-07 11:00:00 +0000
Seen: 9 times
Last updated: Jun 17 '21
What is the issue with establishing a connection between Flyway and SSL-enabled PostgreSQL?
How to add new SQL Server records and modify existing records in pandas dataframe?
What are the Cordapp Certificates used for in terms of signing and interacting?
How can SSL be used with CqlSessionFactoryBean in Springboot Cassandra?
How to set up Database First configuration in Entity Framework 7 for MVC 6?
How do I resolve a 502 error when attempting to call an HTTPS REST API from an HTTP REST API?
How can SSM parameters be accessed across multiple accounts?
How can compile-time errors be used to limit the possible permutations of a struct in Rust?