Installing Decisions Using Azure Service Principal
  • 24 Nov 2023
  • 1 Minute to read
  • Dark
    Light

Installing Decisions Using Azure Service Principal

  • Dark
    Light

Article summary

Overview

This document demonstrates how to connect Decisions to Azure SQL using Azure Service Principal. To learn more about Azure Service Principal, refer to Microsoft’s Documentation.


Prerequisites

  • An active Azure Account.
  • Azure SQL server
  • Database in SQL server. Refer to Decisions Installation Requirements for the minimum DB levels to be used.
Note:
  • Ensure that you do not select the "Use SQL authentication" method while creating the SQL Server.
  • Ensure that the admin is set while creating the SQL server. 
Refer to the following image.


App Registrations in Azure

  1. Open the Microsoft Entra ID (Formerly known as Azure Active Directory).
  2. Navigate to Left Panel > Manage > App registrations.
  3. Create a new registration and configure the registration as per the requirement. Refer to Application registration
  4. Generate a Client secret for the app registration. To generate the client secret, refer to Service principal authentication.
  5. Copy the following App registration details for the next step,

    • App registration Name
    • Application (client) ID
    • Directory (tenant) ID
    • App. Client Secrets Value.
  6. Copy the DB server and DB name for the next step.

    • Database Name
    • Server Name

Configurations in SQL Database

  1. Go to SQL server > SQL database.
  2. Navigate to the left panel > Query Editor (preview). A login window appears.
  3. Login through the Microsoft Entra authentication (formerly known as Active Directory authentication).

    Note:
    If you get an error to connect Query Editor, click on the "allowlist IP…" link generated under the error.
  4. Edit your_app_registration_name and run the following Query in the SQL database.
CREATE USER "your_app_registration_name" FROM EXTERNAL PROVIDER GO
EXEC sp_addrolemember 'db_owner', "your_app_registration_name" GO
GRANT ALTER ANY USER TO "your_app_registration_name" GO

Installing Decisions Using Azure Service Principal

  1. Open the Decisions installer, Enable "Change Settings on Update," and click on Update.
  2. Configure the settings till you land on the Database Setup screen.
  3. Select Azure SQL and under Connection Settings, select Using Azure Service Principal option. 
  4. Enter all the credentials that were copied earlier. Hit Test to check the connection. 
  5. Once the test is successful, continue with the Installation process.


External Database Integration using Azure Service Principal

To learn about External Database Integration in Decisions. Refer to the article External Database Integration.

  1. In Decisions Studio, navigate to System > Integrations > Databases and click CREATE CONNECTION.
  2. Give a Connection Name.
  3. Select Database Type as AZURE. Authentication Type as Using Azure Service Principal and enter all the credentials that were copied earlier.
  4. Hit TEST to check the connection. After a successful connection, CLOSE the Window.
  5. The integration will be added with the given Connection Name to the Folder Data in Decisions.

Was this article helpful?