Skip to main content
Microsoft Dataverse is the data platform behind Dynamics 365 and Power Platform. The Microsoft Dataverse connector lets your Lovable app read and manage the tables in a Dataverse environment. That covers standard tables such as accounts, contacts, leads, opportunities, and cases, and the custom tables your organization adds. It’s designed for apps that work with Dynamics 365 Sales, Dynamics 365 Customer Service, or Power Platform data. The Microsoft Dataverse app user connector needs Microsoft Entra and Power Platform setup that is specific to this connector. See Per-user access with the app user connector below. With Microsoft Dataverse, your app can:
  • Read and query tables with column selection, filters, lookups, and paging
  • Create, update, and delete records, including choice and lookup columns
  • Look up table and column names from the environment’s metadata
  • Sync changes incrementally with Dataverse change tracking on tables where it is enabled
  • Work with several environments from one connection
The connector is a good fit for sales dashboards, case management tools, and back-office apps that need live Dynamics 365 data.

Common use cases and example apps

These examples show what you can build with Microsoft Dataverse, each with a prompt to start from.

How Microsoft Dataverse connections work

A connection ties one Microsoft work account to one Dataverse environment, plus any other environments of the same Microsoft Entra tenant that you list.
  • Environment: You enter the environment URL, for example https://org12345.crm4.dynamics.com. Lovable reads the Microsoft Entra tenant from the environment itself, so you do not need to enter a tenant ID.
  • Account: Lovable signs in with your Microsoft work account and keeps the session refreshed. Every request your app makes runs as that account, and Dataverse applies that account’s security roles. In Microsoft Entra, the connection appears under the enterprise application Lovable Dataverse.
  • Gateway: Lovable routes your app’s API requests through its connector gateway, which handles the Microsoft sign-in tokens for you.
All API requests made through this connector count against the request limits Microsoft applies to the connected account, its service protection limits. Billing and quota are handled directly by Microsoft, not Lovable.

How to connect Microsoft Dataverse

Who can create Microsoft Dataverse connections depends on your plan and workspace settings. App + chat connectors are available by default. On Business and Enterprise plans, Who can create connections and clients starts at Admins. Some Enterprise workspaces start at No one, which disables the connector. An admin or owner changes it in Connectors → Admin settings → App + chat connectors. You can create multiple Microsoft Dataverse connections using different accounts or environments, for example one connection per Microsoft Entra tenant. To reach several environments of one tenant with a single sign-in, list them in one connection instead, as described in Working with several environments. When the connection is created, you can link it to the projects where you want to use it. Anyone building in a project can ask Lovable in the project chat to link their project to it.

Prerequisites

Before connecting Microsoft Dataverse, make sure you have:
  • A Microsoft work account that can already open the environment, for example in the Dynamics 365 app your organization uses. If it cannot, ask your Power Platform administrator for a security role in that environment and a Dynamics 365 or Power Apps license.
  • The environment URL, listed under Environments in the Power Platform admin center. If the admin center does not open for you, your Power Platform administrator can copy the URL for you.
  • Permission to create connections in your Lovable workspace (see Who can create connections and clients)

Set up your Microsoft Dataverse connection

You enter the environment URL and authorize Lovable with your Microsoft work account. You do not need an API key. When you click Connect at the top of the connector page, Lovable either opens the connection form, or skips the form and connects with the default settings. On some connectors, that one-click connection is a chat connector connection, which your apps can’t use. To choose the settings yourself, open the form from More options, as the steps below do.
1

Open Microsoft Dataverse in Connectors

Open Connectors and select Microsoft Dataverse. For the other places to open the catalog from, see Where to find connectors.
2

Add a connection

On the connector page, click More options, then App + chat connector.
3

Name the connection

Lovable fills in a Display name for the connection, which you can change. The name is only used inside Lovable to identify the connection.
4

Enter the environment URL

Enter the Environment URL of the Dataverse environment you want to connect, for example https://org12345.crm4.dynamics.com. Click Find your environment URL to open the Power Platform admin center and copy it. You cannot change the environment URL after you create the connection, so check it before you continue. To use another primary environment later, create a new connection.
5

Add other environments (optional)

To let the connection reach other environments of your organization, expand Advanced settings and list up to 20 environment URLs under Additional environment URLs, separated by commas.Lovable checks each listed environment at sign-in and refuses one that belongs to another Microsoft Entra tenant. An environment Lovable cannot reach does not block sign-in. Lovable checks the tenant again every time your app switches to that environment, so you can edit the list after signing in.
6

Choose who can use this connection

The connection is private to you by default. To share it, click Edit on the Who can use it row, then Share with others. Then add workspace members by email, or click Invite entire workspace to make the connection available to everyone in your Lovable workspace.See Who can use connections and clients for more information.
7

Connect to Microsoft and authorize

Click Connect. The Microsoft sign-in window opens, so make sure your browser doesn’t block pop-ups. If it does, Lovable redirects you instead.Sign in with your Microsoft work account if prompted, review the requested permissions, and accept. If your organization limits which apps or permissions people can consent to, the Microsoft sign-in page asks you to request an administrator’s approval instead of showing the accept button. Sign-in completes only after a Microsoft 365 administrator approves Lovable Dataverse.Microsoft Entra lists Lovable Dataverse without a verified publisher, and many organizations let people consent only to applications from verified publishers. The administrator approves your request under Enterprise applications → Admin consent requests, or signs in to this connection and ticks Consent on behalf of your organization. Both cover only the permission this connector requests and apply to everyone in your organization. After the approval, sign in again.You’ll be redirected back to Lovable with a confirmation.
When connected, anyone building in a project can ask Lovable in the project chat to link their project to Microsoft Dataverse. Linking follows the connection’s access rules. Your Lovable apps can then read and manage Dataverse records as the connected account.

Working with several environments

To work with more than one environment, such as a sandbox and production, list the others under Additional environment URLs when you create or edit the connection. In the project chat, tell Lovable which environment each feature should use. Your single sign-in covers all of them, with these rules:
  • Every listed environment must belong to the same Microsoft Entra tenant as the environment under Environment URL. For another tenant, create a separate connection.
  • The connected account needs a security role in every environment it uses, including the one under Environment URL. Without a role, Dataverse returns a permission error. Ask your Power Platform administrator to grant the role in the admin center.
  • Requests that name no environment go to the environment under Environment URL.

Per-user access with the app user connector

An app + chat connection signs every request as one Microsoft work account. With the Microsoft Dataverse app user connector, each user of your published app signs in with their own Microsoft work account. Dataverse then applies that user’s security roles, column security, and auditing to every request, so a user sees and changes only the records their own roles allow. You set it up once in Lovable as a client, the record that holds your Microsoft Entra app registration and the environment URLs. Each user then signs in through that client.
This connector type needs two things from your Microsoft administrators: Dataverse access for each user (Step 1) and a Microsoft Entra app registration (Step 2). Plan the setup with them before you start.

How per-user access works

Every user goes through the same flow:
  1. A user clicks connect in your published app and signs in with their Microsoft work account.
  2. Lovable’s connector gateway stores that user’s sign-in tokens encrypted and keeps them refreshed. Your project does not see those tokens.
  3. Your app’s requests for that user run as that user, so Dataverse applies their security roles. One sign-in covers the client’s Environment URL and every environment listed under its Additional environment URLs.

Step 1: Grant Dataverse access (Power Platform administrator)

The Microsoft sign-in does not grant Dataverse access by itself. Each user of your app needs three things, and a user who already opens the environment in a Dynamics 365 or Power Apps app has all three:
  • A Power Apps or Dynamics 365 license that includes Dataverse, or a Power Apps per app plan allocated to the environment. Licenses are assigned in the Microsoft 365 admin center.
  • Membership in the environment’s security group, when the environment has one. Group membership is managed in the Microsoft 365 admin center or in Microsoft Entra.
  • At least one security role in every environment the user works in, assigned under Settings → Users + permissions → Users for the environment in the Power Platform admin center. Without a role, Dataverse rejects every request from that user with a permission error, even after a successful sign-in. Reconnecting does not fix it.
Table and column permissions come from those roles.

Step 2: Register the Microsoft Entra app (Microsoft 365 administrator)

Register an application in the Microsoft Entra tenant that owns your Dataverse environment. Microsoft’s walkthrough for Dataverse covers each step. You can reuse an existing app registration if you add the redirect URI and the permission below.
1

Register an application

Sign in to the Microsoft Entra admin center, open App registrations, and select New registration. Under Supported account types, single-tenant and multi-tenant both work, and guests invited into the tenant can sign in.
2

Note the Application (client) ID

On the app’s Overview page, copy the Application (client) ID. You enter it in Lovable in Step 3.
3

Add the redirect URI

Under Manage, select Authentication. Under Platform configurations, select Add a platform, select Web, and under Redirect URIs add Lovable’s connector gateway callback URL:
Register it under the Web platform, not Single-page application: with a single-page application redirect URI, sign-in fails after the user accepts. Lovable shows the same value, with a copy button, in the client form.
4

Add the Dataverse permission

Under API permissions, add the delegated user_impersonation permission of Dataverse. In Microsoft’s walkthrough, you find it by searching for Dataverse under APIs my organization uses.Users consent to it at their first sign-in. If your organization limits which apps or permissions people can consent to, a Microsoft 365 administrator grants consent on your app registration instead, with Grant admin consent on its API permissions page.
5

Create a client secret

Go to Certificates & secrets → New client secret, enter a description and an expiry, and select Add. Copy the secret Value immediately. Microsoft shows it only once, and Secret ID is not the secret.
The client secret functions like a password. Store it securely, and paste it only into the client form in Lovable. Do not put it in a prompt, a chat message, or your app’s code.
Note the expiry you chose. When the secret expires, every user’s Dataverse requests fail until you create a new secret and update Client Secret on the client in Lovable. Users stay connected through the update.
Give the Application (client) ID and the secret value to the person who adds the client in Lovable.

Step 3: Add the client in Lovable

Who can add a client follows Who can create connections and clients. On Business and Enterprise plans, workspace admins and owners choose who can under Connectors → Admin settings → App user connectors.
1

Open Microsoft Dataverse in Connectors

Open Connectors and select Microsoft Dataverse.
2

Add an app user client

Open More options and select App user connector. Lovable fills in a Display name for the client, which you can change.
3

Enter the registration details

In the form, enter:
  1. Client ID (Application ID): the Application (client) ID from Step 2.
  2. Client Secret: the secret value from Step 2.
  3. Environment URL: the Dataverse environment, for example https://org12345.crm4.dynamics.com. You cannot change it after you create the client, so check it before you continue. To use another primary environment later, create a new client.
  4. Additional environment URLs (optional): up to 20 other environments of the same Microsoft Entra tenant that one sign-in should reach, separated by commas. Lovable refuses an environment of another tenant at the user’s sign-in.
4

Choose who can use the client

The client is private to you by default. To share it, click Edit on the Who can use it row, then Share with others. Then add workspace members by email, or click Invite entire workspace to make the client available to everyone in your Lovable workspace.See Who can use connections and clients for more information.
5

Decide on offline access

On Business and Enterprise plans, Advanced settings shows Offline access, disabled by default. Leave it disabled only when all of the following hold: every user is a workspace member signed in to Lovable, the app is published to your workspace, and the app is a new Lovable app created from May 13, 2026, which uses TanStack Start. Lovable then recognizes each member through workspace identity reuse. Enable it in every other case, for example:
  • The app is an older React + Vite app.
  • Your users sign in to your app another way, or visitors of a publicly published app connect.
  • The app works for users in the background.
After the client is linked to a project, you can no longer disable it. On Free and Pro plans, offline access is always enabled. See Offline access for what the setting changes in your app.
6

Create the client

Click Create client.

Step 4: Add the connect experience to your app

When the client exists, tell Lovable in the project chat what each user should see. Lovable shows a card to link Microsoft Dataverse for app users: select the client and click Link. Lovable then links the client to your project and builds the Microsoft sign-in and the per-user requests into your app. For example:
Your app must know who the current user is before they connect, so each Microsoft sign-in is tied to that person. For newer apps published to your workspace on Business and Enterprise plans, Lovable recognizes the signed-in member through workspace identity reuse. Other apps need built-in authentication or your own authentication, and the client needs offline access enabled.

Rules specific to per-user access

These rules apply only to the app user connector:
  • A permission error from Dataverse is that user’s missing security role, privilege, or license (Step 1), not a Lovable setting. A Power Platform administrator grants the missing access.
  • Each user’s requests count against that user’s own Dataverse service protection limits, not against one shared account.
  • Your app acts only as the signed-in user. Dataverse rejects a request that acts as someone else unless that user holds the Delegate security role.
  • When a user’s Microsoft consent is revoked, their password is reset, or they have not used the app for a long period, that user reconnects in your app.
  • When a user disconnects, Lovable removes that user’s connection. Their Microsoft browser session stays signed in, so a reconnect picks the same account. To let users switch accounts, ask Lovable to add an option to connect a different Microsoft account.

Limitations

Neither Microsoft Dataverse connector type on this page can:
  • Connect environments outside the commercial cloud. The form accepts hosts such as https://org12345.crm4.dynamics.com, where the number after crm varies by region. The form rejects the .crm.microsoftdynamics.us, .crm.appsplatform.us, and .crm.dynamics.cn hosts of the US Government and China clouds.
  • Address environments of different Microsoft Entra tenants from one connection or client.
  • Connect as an application user (service principal). Every connection and every per-user sign-in is a person’s Microsoft work account.
  • Receive change notifications from Dataverse. Your app polls or uses change tracking instead.
The app + chat connector also cannot:
  • Support per-end-user Dataverse login. Each connection represents a single Microsoft work account shared across all projects linked to it. If you need each user of your app to sign in with their own Microsoft work account, use per-user access with the app user connector.
If Microsoft authorization is revoked from the Microsoft side, you’ll need to reconnect the integration in Lovable before API calls can succeed again.

Troubleshooting

Use these checks when connecting fails or a Dataverse request returns an unexpected status.
This is intended. The field accepts only the environment’s host, such as https://org12345.crm4.dynamics.com. Copy the URL from the Environments list in the Power Platform admin center and remove any path after the host.
Lovable can no longer refresh the Microsoft session. This happens after a password reset, revoked consent, or a long period without use, and the connection needs a new sign-in. The connection shows an Expired badge and a banner reading “Connection expired”. Open the connection and click Reconnect next to Microsoft Dataverse account.
The client secret of your Microsoft Entra app registration has expired or was replaced, so Lovable can no longer refresh any user’s sign-in. Reconnecting does not fix it. Create a new secret under Certificates & secrets in the app registration. Then open the client under Connectors → Microsoft Dataverse and click Edit on the OAuth client row. Click Edit next to Client Secret, paste the new value, and click Update. Users stay connected. If the failures stop by themselves after a few minutes, the cause was a temporary Microsoft or network error.

Manage your Microsoft Dataverse connection

Connections are managed from Connectors: select Microsoft Dataverse, then open the connection.
  • Unlink projects to remove Microsoft Dataverse access from specific projects while keeping the connection available for others. See Unlink projects from a connection for the steps.
  • Delete the connection to remove it from the workspace entirely. Deleting is permanent. It removes the credentials from all linked projects, and app features that use Microsoft Dataverse stop working until a new connection is added. See Delete a connection for the steps and who can delete.