Skip to content
Quick Start: Connect App Builder with Microsoft’s Data API Builder for Any Database

Quick Start: Connect App Builder with Microsoft’s Data API Builder for Any Database

Want to quickly connect your database and build full-featured apps? This guide will show you how to connect App Builder with Microsoft's Data API Builder. Read more.

3min read

Want to quickly connect your database to App Builder and start building full-featured apps with REST APIs? This guide will walk you through using Microsoft’s Data API Builder (DAB) to create a REST API from any supported database (SQL Server, MySQL, PostgreSQL, and more) — and then plug it directly into App Builder.

Connect App Builder with Microsoft’s Data API Builder

Why Use Data API Builder?

Microsoft’s DAB provides a fast and flexible way to expose your database via REST or GraphQL without writing a backend. Here’s what you get out of the box:

  • REST Endpoints: GET, POST, PUT, PATCH, DELETE
  • Filtering, Sorting, Pagination
  • OpenAPI (Swagger) Support
  • Works with Tables, Views, Stored Procedures
  • In-memory caching
  • Open Source & Free to Use

Step 1: Install Data API Builder CLI

Install the DAB CLI globally using .NET:

dotnet tool install -g Microsoft.DataApiBuilder

If it’s already installed:

dotnet tool update -g Microsoft.DataApiBuilder

For more details, refer to the official documentation DAB Installation Docs.

Step 2: Set Up Your Database

You’ll need a database ready to go — SQL Server, MySQL, or PostgreSQL. Use SQL Server Management Studio, MySQL Workbench, or your preferred DB tool to spin one up.

In this example, we’ll use an MSSQL database.

Step 3: Initialize the DAB Configuration

Create a baseline configuration file using your connection string:

dab init --database-type "mssql" --host-mode "Development" --connection-string "Server=YOUR_SERVER;Database=YOUR_DB;Integrated Security=True;"

Then, add an entity:

dab add Products --source "Products" --permissions "anonymous:*"

This adds a REST endpoint for the Products table. You can now interact with it via /api/Products.

Enable CORS if needed:

jsonCopyEdit"origins": ["*"]
Here’s what your basic dab-config.json might look like (simplified for clarity):
{
  "data-source": {
    "database-type": "mssql",
    "connection-string": "Server=YOUR_SERVER;Database=NorthwindCRUD;Integrated Security=True;"
  },
  "runtime": {
    "rest": {
      "enabled": true,
      "path": "/api"
    },
    "host": {
      "cors": {
        "origins": ["*"]
      },
      "authentication": {
        "provider": "StaticWebApps"
      },
      "mode": "development"
    }
  },
  "entities": {
    "Products": {
      "source": {
        "object": "Products",
        "type": "table"
      },
      "rest": { "enabled": true },
      "permissions": [
        {
          "role": "anonymous",
          "actions": [{ "action": "*" }]
        }
      ]
    }
  }
}

Step 4: Run and Test the API

Launch the API with:

dab start

You’ll see output like:

Now listening on: http://localhost:5000

Visit http://localhost:5000/swagger/index.html to test your endpoints in the Swagger UI.

running and testing the API

Step 5: Connect to App Builder

Now that your API is live and Swagger is enabled, you can easily bring it into App Builder.

Follow this step-by-step guide

connect to App Builder

Troubleshooting Tips

ProblemSolution
🔄 CORS IssuesAdd "origins": ["*"] in your host.cors section
❌ DELETE Not WorkingCheck if "permissions": "anonymous:*" includes DELETE
🔐 Auth ProblemsMake sure connection string uses correct auth method
🧩 Form CRUD MissingForm component needs more from OpenAPI — in progress
🔑 Need OIDC?Track the OpenID Connect GitHub issue

Wrap-up

In just a few steps, you’ve built and tested a REST API from your database and connected it to App Builder. Whether working with legacy databases or starting fresh, Data API Builder helps you move fast, and App Builder brings your front-end to life.

You can watch our webinar to see how to handle database integration seamlessly using Data API Builder.

Additional Resources

Related Articles

How To Improve Developer Productivity With Low-Code Tools?

How To Improve Developer Productivity With Low-Code Tools?

According to low-code statistics by Forrester, “91% of IT and business decision makers responsible for digital transformation initiatives at enterprises in the US, the UK, Canada, and Australia use low code to improve existing IT capabilities to promote agility and innovation.” And now, they are used as tools to improve developer productivity too. But how?

Request a Demo