- 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
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.
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.Open Microsoft Dataverse in Connectors
Add a connection
Name the connection
Enter the environment URL
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.Add other environments (optional)
Choose who can use this connection
Connect to Microsoft and authorize
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.How per-user access works
Every user goes through the same flow:- A user clicks connect in your published app and signs in with their Microsoft work account.
- Lovable’s connector gateway stores that user’s sign-in tokens encrypted and keeps them refreshed. Your project does not see those tokens.
- 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.
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.Register an application
Note the Application (client) ID
Add the redirect URI
Add the Dataverse permission
Create a client secret
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.Open Microsoft Dataverse in Connectors
Add an app user client
Enter the registration details
- Client ID (Application ID): the Application (client) ID from Step 2.
- Client Secret: the secret value from Step 2.
- 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. - 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.
Choose who can use the client
Decide on offline access
- 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.
Create the 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: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 aftercrmvaries by region. The form rejects the.crm.microsoftdynamics.us,.crm.appsplatform.us, and.crm.dynamics.cnhosts 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.
- 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.
Troubleshooting
Use these checks when connecting fails or a Dataverse request returns an unexpected status.Must be a Dataverse environment URL like https://org12345.crm4.dynamics.com
Must be a Dataverse environment URL like https://org12345.crm4.dynamics.com
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.The connection shows Expired
The connection shows Expired
Every user's Dataverse requests fail at the same time
Every user's Dataverse requests fail at the same time
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.