Skip to content

Microsoft Fabric Setup

Bert Verbeek edited this page Nov 7, 2025 · 1 revision

Microsoft Fabric Setup

This guide explains how to set up bc2adls to export data from Dynamics 365 Business Central to Microsoft Fabric Lakehouse, with data consolidation through Fabric notebooks.

📋 Table of Contents

Overview

The Microsoft Fabric option provides a modern, streamlined approach to exporting Business Central data directly into a Fabric Lakehouse without requiring Azure Synapse Analytics.

Key Features

  • ✅ Direct integration with Microsoft Fabric ecosystem
  • ✅ Simplified setup - no Azure Synapse required
  • ✅ Delta Parquet table format for optimal performance
  • ✅ Native Power BI integration
  • ✅ Notebook-based data consolidation
  • ✅ Modern lakehouse architecture

What You Get

  • CSV delta files in Fabric Lakehouse
  • Delta Parquet tables after notebook consolidation
  • Direct Power BI access to lakehouse tables
  • Scheduled automation via Fabric notebooks

Architecture

The following diagram illustrates the data flow:

Fabric Architecture

Data Flow:

  1. Business Central exports incremental updates to the deltas folder in Fabric Lakehouse
  2. Fabric notebook consolidates deltas into Delta Parquet tables
  3. Data is accessible via:
    • Power BI (native Fabric integration)
    • Spark notebooks
    • SQL endpoints
    • Other Fabric tools

Prerequisites

Before starting, ensure you have:

  • ✅ Microsoft Fabric capacity or trial
  • ✅ Dynamics 365 Business Central environment (Online or On-Premises)
  • ✅ Fabric workspace with contributor access or higher
  • ✅ Azure Active Directory access to create App Registrations
  • ✅ User with SUPER permissions in Business Central

Setup Steps

Step 1: Create an Azure Service Principal

Create an App Registration in Azure Active Directory for authentication.

  1. Navigate to Azure Portal > Azure Active Directory > App registrations
  2. Click New registration
  3. Provide a name (e.g., "BC2Fabric")
  4. Under Supported account types, select Accounts in this organizational directory only
  5. Add redirect URI: https://businesscentral.dynamics.com/OAuthLanding.htm
  6. Click Register

Note the following values:

  • a) Application (client) ID
  • b) Directory (tenant) ID

App Registration

  1. Go to Certificates & secrets > New client secret
  2. Add a description and expiration period
  3. Click Add
  4. c) Copy the secret value immediately

Step 2: Add API Permissions to Service Principal

The service principal needs additional permissions to communicate with Microsoft Fabric.

  1. In your App Registration, go to API permissions
  2. Click Add a permission
  3. Select Azure Storage
  4. Select Delegated permissions
  5. Search for and select user_impersonation
  6. Click Add permissions

API Permissions

  1. If required by your organization, click Grant admin consent

Step 3: Create a Fabric Lakehouse

Create a lakehouse in Microsoft Fabric to store your Business Central data.

  1. Open Microsoft Fabric portal (app.fabric.microsoft.com)
  2. Navigate to your desired workspace (or create a new one)
  3. Click + New > More options
  4. Select Lakehouse

Fabric Create New

  1. Enter a name for your lakehouse (e.g., "BusinessCentralData")
  2. Click Create

Note the lakehouse name - you'll need it for Business Central configuration.


Step 4: Import Fabric Notebooks

Import the pre-built notebooks to consolidate delta files into tables.

  1. In your Fabric workspace, click + New > Import notebook
  2. Choose Upload from the dialog
  3. Navigate to and select the notebook file from your bc2adls repository:
    • fabric/CopyBusinessCentral.ipynb - Main consolidation notebook
  4. Click Open
  5. The notebook will appear in your workspace

Rename the notebook (optional):

  1. Click on the notebook name
  2. Edit to a descriptive name (e.g., "BC2ADLS Data Consolidation")
  3. Press Enter to save

Rename Notebook

Additional notebooks available:

  • CopyBusinessCentral_parallel_option.ipynb - Parallel processing version for large datasets
  • CreateDateTable.ipynb - Utility to create a date dimension table

Step 5: Add Service Principal to Workspace

Grant the service principal access to your Fabric workspace.

  1. In your Fabric workspace, click Manage access (or workspace settings)
  2. Click + Add people or groups
  3. Search for your service principal name (from Step 1)
  4. Select it from the search results
  5. Assign role: Contributor or Admin
  6. Click Add

Manage Access Fabric

If you cannot find the service principal:

  1. Go to Fabric Admin Portal > Tenant settings
  2. Find Developer settings > Service principals can use Fabric APIs
  3. Enable the setting
  4. Apply to The entire organization or specific security groups
  5. Save changes

Fabric Tenant Settings


Step 6: Install Business Central Extension

Install the bc2adls extension in your Business Central environment.

  1. Download or clone the extension from the businessCentral/app folder
  2. Open the folder in Visual Studio Code with AL Language extension installed
  3. Press F5 or use Ctrl+Shift+P > AL: Publish
  4. The extension will compile and install

Assign Permission Sets:

Permission Set Purpose Assign to
ADLSE - Setup Configure export settings Administrators
ADLSE - Execute Run exports Users running exports
ADLSE - Track Delete Track record deletions All users who delete records

Step 7: Configure Business Central Settings

Configure the connection between Business Central and Microsoft Fabric.

💡 Tip: For a complete reference of all configuration options, see the Configuration Reference page.

  1. Open Business Central
  2. Search for and open Export to Azure Data Lake Storage (Page 82560)
  3. Fill in the following fields:

Connection Settings

Field Value Description
Storage Type Microsoft Fabric Select Fabric as the storage destination
Tenant ID From Step 1 (b) Directory (tenant) ID
Workspace YourWorkspaceName Fabric workspace name (or GUID)
Lakehouse BusinessCentralData Lakehouse name (or GUID)

Important Notes on Naming:

  • ⚠️ Workspace and Lakehouse names cannot contain spaces
  • ⚠️ Use the exact name as shown in Fabric
  • ⚠️ Alternatively, you can use GUIDs (found in Fabric URLs)

Example with GUID:

  • Workspace GUID: 12345678-1234-1234-1234-123456789abc
  • Lakehouse GUID: 87654321-4321-4321-4321-cba987654321

Export Settings

Field Value Description
Skip row version sorting No (default) Enable only if experiencing timeouts
Delayed Export 0 (default) Delay in seconds before exporting changes
Emit telemetry Yes (default) Send operational telemetry
Export Enum as Integer No (default) Export enum values as integers or text
Add delivered DateTime Based on preference Include export timestamp in files
Export Company Database Tables Select company Company for DataPerCompany=false tables

Business Central Fabric Settings

About Export Company Database Tables

This setting optimizes export of tables where DataPerCompany = false:

  • These tables contain the same data across all companies
  • Exporting from one company prevents duplicate exports
  • Improves performance and reduces data redundancy

Step 8: Schedule Notebook Execution

Automate the data consolidation notebook to run periodically.

  1. Open your notebook in Fabric
  2. Click Run in the toolbar to test it manually first
  3. Once verified, click Schedule in the ribbon
  4. Configure the schedule:
    • Repeat: Choose frequency (e.g., Hourly, Daily)
    • Time zone: Select your time zone
    • Start time: When to begin
    • End date (optional): When to stop
  5. Click Apply

Recommended schedule:

  • Match or slightly lag your BC export schedule
  • Example: If BC exports every hour at :00, schedule notebook at :15

Configuration Details

Understanding Storage Type

When you select Microsoft Fabric as the storage type:

  • Data exports directly to Fabric Lakehouse
  • No Azure Storage Account required
  • Uses Fabric's native storage
  • Authentication via Service Principal

Workspace and Lakehouse Identification

By Name:

  • Simpler and more readable
  • Must not contain spaces
  • Case-sensitive
  • Example: ProductionWorkspace, BCLakehouse

By GUID:

  • More reliable for programmatic access
  • Found in Fabric URL
  • Example URL: https://app.fabric.microsoft.com/groups/12345678-.../lakehouses/87654321-...
  • GUID is the hexadecimal identifier in the URL

Delta Parquet Format

Microsoft Fabric uses Delta Lake format:

  • ACID transactions for data reliability
  • Schema evolution support
  • Time travel capabilities
  • Efficient updates and deletes
  • Better compression than CSV
  • Optimized for analytics

Next Steps

Once setup is complete:

  1. Configure table exports - Select tables and fields to export
  2. Run your first export - Test with a few tables
  3. Execute notebook - Consolidate deltas into tables
  4. Schedule recurring exports - Automate with Job Queue
  5. Connect Power BI - Use native Fabric integration

Recommended Reading


Troubleshooting

Connection Issues

Problem: "Could not authenticate with Fabric"

  • ✅ Verify Tenant ID is correct
  • ✅ Ensure redirect URI is set: https://businesscentral.dynamics.com/OAuthLanding.htm
  • ✅ Check service principal has workspace access
  • ✅ Verify "Service principals can use Fabric APIs" is enabled

Problem: "Workspace not found"

  • ✅ Verify workspace name has no spaces
  • ✅ Check spelling and case sensitivity
  • ✅ Try using workspace GUID instead of name
  • ✅ Ensure service principal is added to workspace

Problem: "Lakehouse not found"

  • ✅ Verify lakehouse name matches exactly
  • ✅ Ensure lakehouse exists in the specified workspace
  • ✅ Try using lakehouse GUID

Notebook Issues

Problem: Notebook fails to run

  • ✅ Check lakehouse is attached to notebook
  • ✅ Verify delta files exist in the deltas folder
  • ✅ Review notebook execution logs for errors
  • ✅ Ensure Spark pool is available

Problem: Tables not appearing after notebook run

  • ✅ Refresh the lakehouse view
  • ✅ Check notebook completed successfully
  • ✅ Verify data exists in deltas folder
  • ✅ Review notebook output for errors

Performance Issues

Problem: Export timing out

  • ✅ Enable "Skip row version sorting" temporarily
  • ✅ Export fewer tables at once
  • ✅ Enable "Report read-only data access" feature in BC

Problem: Notebook takes too long

  • ✅ Use the parallel processing notebook version
  • ✅ Reduce number of tables processed simultaneously
  • ✅ Increase Fabric capacity if needed

For More Help

  • 📖 Check FAQs for common solutions
  • 🐛 Report issues on GitHub
  • 💬 Join community discussions

Related Pages:

Next: Fabric Open Mirroring | Execution Guide | Back to Home

Clone this wiki locally