Dataverse for Architects: Designing with Alternate Keys in Mind
In Microsoft Dataverse, data integrity and uniqueness are critical for building scalable, enterprise-grade apps. While Dataverse ensures every row has a system-generated GUID as its primary key, real-world business scenarios often require natural identifiers like Customer Numbers or Email Addresses to enforce uniqueness.
This is where Keys in Dataverse—both primary and alternate—become essential. In this guide, we’ll deep dive into:
- What keys are in Dataverse
- Technical details for developers
- Strategic insights for architects
- Real-world use cases
- Limitations and best practices
What Are Keys in Dataverse?
A key in Dataverse defines a column (or set of columns) that enforces uniqueness in a table.
This means no two rows can have the same value for the key column(s).
There are two types of keys in Dataverse:
Primary Key (System-Managed)
- Every Dataverse table automatically includes a GUID primary key (e.g., `contactid`, `accountid`).
- Assigned automatically when a record is created.
- Immutable – once created, it never changes.
Example:
`accountid = 15f2b5d0-34d1-4a18-8e42-44c9b33e43a2`
Alternate Keys (User-Defined)
- Alternate keys let you enforce uniqueness on one or more columns of your choice.
- They’re great for business identifiers like Customer Numbers, Emails, or SKU Codes.
How to Create Alternate Keys
Step-by-Step
1️⃣ Go to [Power Apps Maker Portal](https://make.powerapps.com)
2️⃣ Select your table (e.g., Account) → Keys tab
3️⃣ Click + New Key
4️⃣ Choose column(s) to define as unique
5️⃣ Save and Publish
Supported Column Types:
- Single Line of Text (max 450 chars)
- Whole Number
- Decimal Number
- Lookup (relationships)
Best Practices
- Use alternate keys for external system IDs (e.g., SAP Customer ID).
- Prefer single-column keys for simplicity and performance.
- Avoid using fields that frequently change as keys.
- For composite keys, keep the number of columns minimal.
- Always test large imports or API calls for duplicate key errors.
Real-World Use Cases
- 🛒 E-commerce: `SKU` as alternate key for Product table.
- 🏥 Healthcare: `PatientID` as alternate key for Patient table.
- 📦 Supply Chain: Vendor or Purchase Order Numbers for integration with ERP.
- 📧 CRM: `emailaddress1` for deduplication of Contacts.
Summary
Keys in Dataverse are a must-have tool for both developers and architects:
- Developers – For clean APIs, upserts, and cross-system references
- Architects – For maintaining data integrity and future-proofing solutions
By mastering keys, you can build enterprise-grade, scalable solutions with confidence.
Published on:
Learn moreRelated posts
Power Platform Environment Deep Dive (Part 2)
In Microsoft Power Platform, choosing the right environment type is important because each environment is designed for a different business pu...
Power Platform Environment Deep Dive (Part 1)
Today, in the business enterpriese world, Power Platform enables organization to build application, automate workflow, analyze data crea...
Book Review : Life 3.0 by Max Tegmark
This is the third book I’ve read this year, and even though I’m still in the early chapters, it already feels like my favorite read of the yea...
Dataverse Views Demystified: Making Data Work for You
In Microsoft Dataverse, users do not always see all the data stored in a table. What they can view depends on their security permissions, role...
Decode & Fix : Shared App host initialization has timed out in Microsoft Power Apps
Issue :While working with apps in the Microsoft Power Platform, we encountered a critical issue where the application failed to load pro...
Dataverse Integration Patterns: Sync vs Async vs Event-driven (Real Use Cases)
As organizations start using Microsoft Power Platform, Microsoft Dataverse is no longer just a place to store data—it becomes a key part of ho...
Book Review : Don't Believe Everything You Think by Joseph Nguyen
My second book of this year is "Don’t Believe Everything You Think" by Joseph Nguyen. This book was recommended by a friend who strongly belie...
Book Review : Scary Smart by Mo Gawdat
The first book I read in 2026 was Scary Smart by Mo Gawdat, the former Chief Business Officer at Google.In today’s world, Artificial Intellige...
Managing Temporary User Access in Dataverse with Access Teams
Access Teams let you give people access to one specific record, not the whole table.Access Teams in Microsoft Dataverse are a powerful way to ...
