Initialize Azure SQL database and configuration

If you use Microsoft Azure SQL, you can initialize and configure your database using the instructions on this page. The following authentication methods are supported:

  • SQL authentication

  • Microsoft Azure Active Directory username and password authentication

  • Microsoft Azure Active Directory Integrated authentication

  • Microsoft Azure Active Directory Service Principal authentication

  • Microsoft Azure Active Directory Managed Identity or Managed Service Identity (MSI) authentication

Important: of the modes listed above, only Microsoft Azure Active Directory Managed Identity or Managed Service Identity (MSI) authentication requires additional managed identity configuration. If you are planning to use managed identity authentication, see enable managed identities. The remaining modes require that you specify the appropriate authentication connection property in your connection string. For more information, see Connect to Azure SQL with Microsoft Entra authentication and SqlClient in the Microsoft documentation.
  1. In the Initialize Database and Configuration screen, enter your SQL Database string in the Database Settings field. For more information, see Azure SQL Database Connection String Examples below.
  2. This string can be taken from Azure itself under Settings > Connection strings. Do not copy and paste the connection string.
  3. Azure SQL strings require special attention: The string provided by Azure in the field ADO.NET (SQL authentication) shown below does not contain the password. See the code string at the bottom of this page.
  4. There are two solutions to this:
    1. Enter Your SQL Password in the "Database Settings" Page:
      • Remove the password field from the connection string and put the password in the "Password" text box in the AutoClassifier Database Settings page
    2. Modify the Connection String:
      • Enter the password in the connection string and it will be processed with the rest of the SQL database script at run-time.

Azure SQL Database Connection String Examples

Azure SQL Database connection string example

Copy
Server=tcp:ac60iis.database.windows.net,1433;Initial Catalog=JasonAC60;Persist Security Info=False;User ID=AC60Admin;Password=ThePasswordHere;MultipleActiveResultSets=False;Encrypt=False;TrustServerCertificate=False;Connection Timeout=30;

Microsoft Azure Active Directory username and password authentication

Copy
Server=acdbserver.database.windows.net; Initial Catalog=ac_connectivity_test; User ID=userid@companyname.com; Password=******; Encrypt=False;TrustServerCertificate=False; Authentication="Active Directory Password";

Microsoft Azure Active Directory Integrated authentication

Copy
Server= acdbserver.database.windows.net; Database=ac_connectivity_test; Persist Security Info=False; User ID=username@domain.com; Encrypt=False; TrustServerCertificate=False; Authentication="Active Directory Integrated";

Microsoft Azure Active Directory Service Principal authentication

Copy
Server= acdbserver.database.windows.net; Authentication=Active Directory Service Principal; Encrypt=False; Database= ac_connectivity_test; User Id=AppId; Password=secret;

Microsoft Azure Active Directory Managed Service Identity (MSI) authentication

Copy
Server=acdbserver.database.windows.net; Authentication=Active Directory MSI; Encrypt=False; User Id=a667a3a6-b1e0-41f8-bab6-c68f5076d625; Database=ac_connectivity_test

Microsoft Azure Active Directory Managed Identity authentication

Copy
Server=acdbserver.database.windows.net; Database=ac_connectivity_test; Authentication="Active Directory Managed Identity"; User Id=a667a3a6-b1e0-41f8-bab6-c68f5076d625; Encrypt=False; TrustServerCertificate=True; Connection Timeout=30; ConnectRetryCount=3; ConnectRetryInterval=10;