Deploying keycloak on AKS
Please Follow this doc:
Connect to that SQL Server using the Azure Active Directory Service Principal
Active Directory Service Principal authentication mode, the client application can connect to Azure SQL data sources by providing the client ID and secret of a service principal identity. Service principal authentication involves:
Setting up an app registration with a secret.
Granting permissions to the app in the Azure SQL Database instance.
Connecting with the correct credential.
Grant access to Azure SQL Database
We need to give your application access to the Azure SQL Database service. This is done through the API Permissions.
Reference 1
Add client authentication
In order to authenticate Active Directory representation of it, switch over to Certificates and create a New client secret.
The following example shows how to use Active Directory Service Principal authentication
Reference 2
The following example shows how to use Active Directory Service Principal authentication.
// Use your own server, database, app ID, and secret.
string ConnectionString = @"Server=demo.database.windows.net; Authentication=Active Directory Service Principal; Database=testdb; User Id=App Id; Password=secret";
using (SqlConnection conn = new SqlConnection(ConnectionString)) {
conn.Open();
}
Refer this link .