Other information
Customer managed Azure SQL

Aimplan for SQL database in Fabric

20min

SQL database in Fabric is in public preview. Features and functionality may change. Ensure to check for updates frequently.

This document describes how to configure a SQL database in Microsoft Fabric for use with Aimplan.



Prerequisites

Before you begin, ensure you have the following:

  • Administrative privileges to Microsoft Fabric.
  • Permissions to create applications in Microsoft Entra.


Create a New SQL Database in Fabric

Follow the steps in the official Microsoft documentation to create a new SQL database: Create SQL Database in Fabric.



Retrieve the Connection String

The database’s connection string is required for connection. Follow these steps to locate it:

  1. Open the SQL database in Fabric.
  2. Navigate to Connection Strings in the database settings.
  3. Record the connection string for later use.

For detailed guidance, see the Microsoft documentation.



Create a Service Principal

SQL databases in Fabric use Microsoft Entra ID for authentication. Traditional username/password methods are not supported.

Method #1 - Using PowerShell

If you are comfortable running commands in PowerShell, you can use this snippet to create a new service principal with client secret. Please record the outputs as they will be used in subsequent steps.

PowerShell


Method #2 - Using GUI

Register a New Application in Microsoft Entra

  1. If managing multiple tenants, switch to the correct tenant using the Settings icon ⚙️ in the top menu.
  2. Navigate to Identity > Applications > App registrations, then select New registration.
  3. Enter a Name for the application, e.g., Aimplan Fabric SQL.
  4. For Supported account types, select Accounts in this organizational directory only.
  5. Click Register.
  6. Once registered, record the following details:
    • Directory (tenant) ID
    • Application (client) ID
    • Object ID

Create a Client Secret

  1. Return to the App registrations section of Microsoft Entra.
  2. Select the application you just created.
  3. Navigate to Certificates & secrets > New client secret.
  4. Provide a description and select an expiration period.
  5. Click Add.
  6. Record the client secret Value. This is displayed only once.


Configure Permissions

Aimplan typically uses two separate logins for database access, but for simplicity, this guide uses one. For production environments, configure two logins as recommended in the Customer Managed Azure SQL Guide.

Scripts include placeholders like <xxxx>, e.g., CREATE SCHEMA I<xxxx>DAT. Replace <xxxx> with your instance number, using only numeric values (e.g., CREATE SCHEMA I0007DAT).



Create Application Schemas

  1. Open the database in Fabric.
  2. Select New Query, paste the following SQL code, and click Run:
SQL


Replace <xxxx> with your instance number.



Create a Role for the Aimplan Application

  1. Navigate to the Security tab and select Manage SQL security > New role.
  2. Enter a name for the role, e.g., Aimplan Application.
  3. Grant full permissions on I<xxxx>DAT, then click Save.


Assign the Application to the Role

  1. Select the newly created role and click Manage Access.
  2. Enter the name of the application created earlier, then click Add.
  3. (Optional) If prompted to share the database:
    • Click Share database.
    • Re-enter the application's name and click Grant.
  4. Save your changes.


Configure Additional Permissions

Since traditional logins are not used, permissions must be assigned to the application directly. Use the following SQL commands:

SQL



Gather and Send Information to Aimplan

After completing the steps, collect the following details:

  • Connection String
  • Directory (tenant) ID
  • Application (client) ID
  • Object ID
  • Client Secret

Send these details securely as a one-time secret to [email protected].



Notes and Best Practices

  • Secure Storage: Safeguard client secrets and connection strings. Only send secrets over secure channels.
  • Expiration Management: Set reminders to renew client secrets before expiration.