Building Offline-First Canvas Apps with Dataverse: A Step-by-Step Guide
Leverage Dataverse offline profiles to create responsive mobile apps that work without constant connectivity—no complex formulas required.
Modern field‑service and retail apps often face unreliable network coverage. With Power Apps and Dataverse you can now create offline‑capable canvas apps without writing complex data‑caching logic. The LoadData and SaveData workarounds are a thing of the past – Dataverse offline mode brings sync management into the configuration layer. In this article you’ll build a mobile inventory auditor app, configure an offline profile, and add a visual sync indicator so your users always know their data status.
Setting the Scene: A Retail Stock Audit Example
Imagine a team of store auditors who travel to different retail locations to perform monthly inventory checks. Many stores have patchy Wi‑Fi or no cellular signal in the back rooms. The auditors need a mobile app that works offline, allows them to record findings, and automatically syncs when a connection is restored. We’ll use Dataverse offline mode to meet this requirement.
Sample Dataverse Table
We’ll base the app on a custom Dataverse table named Store Audit with the following columns:
| Column Name | Data Type | Purpose |
|---|---|---|
| Audit ID | Text (primary name) | Unique identifier, e.g. AUD-101 |
| Store Code | Text | Store location code (e.g. ST-42) |
| Item SKU | Text | Stock keeping unit |
| Item Name | Text | Product description |
| Audit Date | Date Only | Date of the audit |
| Audit Result | Choice (Pass, Issue) | Outcome of the check |
| Notes | Multiline Text | Observations or discrepancy details |
| Audited By | Text | Auditor’s name or ID |
Populate the table with a few sample rows:
| Audit ID | Store Code | Item SKU | Item Name | Audit Date | Audit Result | Notes | Audited By |
|---|---|---|---|---|---|---|---|
| AUD‑101 | ST‑42 | SKU‑1234 | Wireless Mouse | 2026-05-01 | Pass | jdoe | |
| AUD‑102 | ST‑42 | SKU‑5678 | Mechanical KB | 2026-05-01 | Issue | Missing 2 units | jdoe |
| AUD‑103 | ST‑89 | SKU‑9876 | USB‑C Hub | 2026-05-02 | Pass | msmith | |
| AUD‑104 | ST‑89 | SKU‑5432 | 15W Charger | 2026-05-02 | Issue | Damaged box, need return | msmith |
With the data ready, we can now enable offline behaviour for this table.
Enable Offline on the Table
Each Dataverse table that participates in an offline app must be explicitly allowed.
- Open Tables in the Power Apps portal and select the Store Audit table.
- Go to the Properties pane.
- Enable Can be taken offline and save the table.
Without this flag the table will not be included in any offline profile, even if the profile lists it.
Generate a Canvas App from the Table
To keep the focus on offline configuration rather than app layout, we’ll generate an auto‑created app from the Store Audit table.
- In Power Apps Studio select Create > Start from data > Select an existing table.
- Choose the Store Audit table and confirm.
- A three‑screen app (browse, details, edit) is generated automatically.
Later you can customise the screens to match your brand and workflow.
Turn On the Dataverse Offline Feature (Experimental)
Dataverse offline mode is still listed as an experimental feature. You must enable it before your app can sync.
- In Power Apps Studio, open the Settings (gear icon) and select Advanced Settings.
- Navigate to Upcoming features > Experimental.
- Toggle Dataverse offline to On.
- Switch to the General tab and set Can be used offline to On.
An auto‑generated offline profile is created at this point. We’ll replace it with a custom one in the next step.
Build a Custom Offline Profile
A custom profile gives you fine‑grained control over which data is pulled into the device. By filtering to only the auditor’s own records, you reduce sync time and storage.
- Go to the Power Platform Admin Center and select your environment.
- Under Settings expand Users + permissions and choose Mobile configuration.
- Click New profile, name it Store Auditor Profile, and save.
Now add the Store Audit table to this profile:
- Open the Store Auditor Profile and click Add Table.
- Search for Store Audit and select it.
- For Row selection choose User’s rows (based on the owner or the “Audited By” column mapping). This ensures each auditor downloads only their own audits.
- Save the configuration.
Attach the Profile to Your Canvas App
Back in Power Apps Studio:
- Open Settings > General.
- Under Offline find the Select offline profile dropdown.
- Choose Store Auditor Profile.
Now the app will use your custom sync rules instead of the default “bring everything” profile.
Add the Sync Status Icon
Users need a clear visual cue about their sync state. The offline template screen in Power Apps includes a globe icon that changes appearance based on connection status. Instead of building from scratch, we copy that icon into our app.
- Add a new screen using the Offline template.
- Select the globe icon in the top‑right corner and copy it (Ctrl+C).
- Go back to the browse screen (or any other screen) and paste the icon into the header.
- Delete the template screen – you no longer need it.
Set the icon’s properties as follows.
Icon Property
Switch( Connection.Sync, ConnectionSync.Connected, Icon.Globe, ConnectionSync.ConnectedWithWarning, Icon.GlobeWarning, ConnectionSync.ConnectedPendingUpsync, Icon.GlobeChangesPending, ConnectionSync.ConnectedError, Icon.GlobeError, ConnectionSync.ConnectedRefresh, Icon.GlobeRefresh, ConnectionSync.NotConnected, Icon.GlobeNotConnected, ConnectionSync.NotConnectedWithWarning, Icon.GlobeWarning, ConnectionSync.NotConnectedPendingUpsync, Icon.GlobeChangesPending, ConnectionSync.NotConnectedSyncError, Icon.GlobeError )
OnSelect Property (Tap for details)
The globe also acts as a status button. When tapped, it shows a notification describing the current state.
Switch(
Connection.Sync,
ConnectionSync.Connected,
Notify("Online, all data is synced.", NotificationType.Success),
ConnectionSync.ConnectedWithWarning,
Notify(Connection.LastSyncMessage, NotificationType.Warning),
ConnectionSync.ConnectedPendingUpsync,
Notify("Unsaved changes are queued. Connect to sync.", NotificationType.Warning),
ConnectionSync.ConnectedError,
Notify(Connection.LastSyncMessage, NotificationType.Error),
ConnectionSync.ConnectedRefresh,
Notify("Syncing data…", NotificationType.Information),
ConnectionSync.NotConnected,
Notify("Offline – changes are saved locally.", NotificationType.Information),
ConnectionSync.NotConnectedWithWarning,
Notify(Connection.LastSyncMessage, NotificationType.Warning),
ConnectionSync.NotConnectedPendingUpsync,
Notify("Offline with pending changes. Sync when connected.", NotificationType.Warning),
ConnectionSync.NotConnectedSyncError,
Notify(Connection.LastSyncMessage, NotificationType.Error)
)Test the Offline Behaviour
- Save and publish the app from Power Apps Studio.
- Open Power Apps Mobile on a phone or tablet and run the app.
- The first launch will show a “Preparing for offline use” message while the initial data is downloaded.
- Once loaded, disconnect the device from the network (airplane mode) and verify that the globe icon changes to the offline variant.
- Create a new audit record or edit an existing one. The change is stored locally and the icon will indicate pending upsync.
- Reconnect the network – the sync happens automatically. The icon returns to the connected state.
Dataverse offline mode uses an optimistic concurrency model. If multiple users edit the same record while disconnected, the last sync wins unless you implement custom conflict detection. For most field scenarios this is acceptable.
Performance and Security Considerations
- Filter wisely – Use User’s rows or a custom filter (e.g., records from the last 30 days) to keep the download small. Over‑fetching data can slow down the initial sync and consume device storage.
- Encryption – Offline data is encrypted at rest on the device. Still, enforce device PIN or biometrics to protect sensitive business data.
- No custom connectors – Dataverse offline mode only syncs Dataverse tables. You cannot connect to SharePoint, SQL Server, or other endpoints while offline.
- Media and attachments – Image columns and file attachments are not synced offline. Plan to display placeholder images or download them via a separate process.
Common Pitfalls and How to Avoid Them
- Table not offline enabled – Always check the “Can be taken offline” checkbox. If you forget, the table won’t sync even if it appears in the profile.
- Using the auto profile – The auto‑generated profile includes all rows for every table. Always create a custom profile with appropriate filters to avoid huge downloads.
- Forgetting the experimental toggle – Without enabling “Dataverse offline” in the experimental settings, the app will not use the offline profile at all.
- Not testing in true offline mode – Simply disconnecting the Wi‑Fi on a desktop browser may not simulate mobile offline correctly. Use a physical device with airplane mode.
- Icon not appearing – The globe icon relies on the
Connection.Syncproperty, which is only available when the app is configured for offline mode. If the property is empty, double‑check the offline settings and profile assignment.
Troubleshooting Sync Issues
- Check the last sync message – Tap the globe icon when it shows a warning or error. The notification will contain the
Connection.LastSyncMessage, which often gives a clue (e.g. “Table not enabled for offline”). - Clear local cache – If the app behaves strangely, delete and re‑install the Power Apps Mobile app or clear its storage. This removes all offline data and forces a fresh download.
- Conflict resolution – By default the last write wins. If you need to prompt the user for resolution, you can inspect timestamps using the
CreatedOnandModifiedOncolumns before allowing an update. - Increase sync timeouts – For large datasets, consider splitting the data into multiple tables or using incremental sync (available in preview).
Final Thoughts
Dataverse offline mode transforms how we build mobile canvas apps for field use. By moving the data‑sync responsibility from custom Power FX formulas into a configuration‑driven offline profile, you reduce code complexity and maintenance overhead. The built‑in status indicator gives end‑users confidence that their changes are safe.
For most line‑of‑business scenarios where the data resides in Dataverse, this is the recommended approach. It’s well suited to asset inspections, retail audits, service checklists, and any app where users roam in and out of connectivity.
References
- Original article: Power Apps Dataverse Offline Mode For Canvas Apps by Matthew Devaney
- Microsoft Learn – Overview of offline setup: Set up offline canvas apps (preview)
- Microsoft Learn – Offline profile configuration: Create and manage offline profiles
Learn how small coding practices—like using descriptive names, flattening conditions, and simplifying logic—can make your apps easier to update and less error-prone.
Move past the gallery and discover the hidden patterns for validation, navigation, and smart submission handling in your data entry forms.
PowerShell unlocks admin capabilities that the Power Platform admin center simply doesn’t offer—from recovering deleted apps to blocking trial licenses. Here’s how to wield them safely.