Introduction
When working with APIs and data integration in Power Apps, you may come across the term ETag (Entity Tag). ETag plays a crucial role in managing data consistency, handling concurrent updates, and improving performance when interacting with data sources such as Microsoft Dataverse, SharePoint, and custom APIs.
This article explains what ETags are, why they matter, and how they are used in Power Apps.
What is an ETag?
An Entity Tag (ETag) is a unique identifier assigned to a specific version of a record or resource.
Whenever a record is modified, its ETag value changes. This allows applications to determine whether the data has been updated since it was last retrieved.
Think of an ETag as a version number for a record.
Example
Suppose a customer record has the following ETag:
{
"CustomerID": 101,
"Name": "Ketan",
"@odata.etag": "W/\"123456\""
}If another user updates the customer information, the ETag may change to:
{
"CustomerID": 101,
"Name": "Ketan",
"@odata.etag": "W/\"123457\""
}The changed ETag indicates that the record has been modified.
Why are ETags Important?
1. Prevent Data Conflicts
In multi-user environments, multiple users may edit the same record simultaneously.
Without ETags:
User A opens a record.
User B updates the same record and saves.
User A saves their older version.
User B's changes are overwritten.
With ETags, the system can detect that the record has changed and prevent accidental overwrites.
2. Optimistic Concurrency Control
ETags enable optimistic concurrency.
Instead of locking records while users edit them, the system checks whether the record has changed before saving updates.
Benefits include:
Better performance
Reduced locking
Improved scalability
Better user experience
3. Improve API Efficiency
ETags can reduce unnecessary data transfers.
Clients can ask:
"Only send me the resource if it has changed."
This minimizes bandwidth usage and improves application performance.
ETags in Power Apps
Power Apps often works with data sources that expose ETags through OData services.
Common examples include:
Microsoft Dataverse
SharePoint
Custom REST APIs
OData-based services
When records are retrieved, the ETag value is typically included in the response.
Example:
{
"@odata.etag": "W/\"789654\"",
"Title": "Project Alpha",
"Status": "Active"
}ETag in SharePoint Lists
When Power Apps connects to SharePoint, every list item contains an ETag value.
Example:
{
"__metadata": {
"etag": "\"3\""
}
}Whenever the list item changes:
{
"__metadata": {
"etag": "\"4\""
}
}The incremented value indicates a newer version of the item.
How Power Apps Uses ETags
Power Apps automatically uses ETags behind the scenes when updating records.
For example:
Patch(
Customers,
ThisItem,
{
Status: "Approved"
}
)The platform sends the ETag along with the update request to verify that the record has not changed since it was loaded.
If the ETag does not match the latest version, the update may fail with a concurrency-related error.
Handling Concurrency Errors
A common scenario:
User A opens a record.
User B modifies and saves it.
User A attempts to save outdated information.
The ETag mismatch is detected.
Possible error message:
The specified record has been modified by another user.Recommended Handling
Use error handling functions:
IfError(
Patch(
Customers,
ThisItem,
{
Status: "Approved"
}
),
Notify(
"The record was updated by another user. Please refresh and try again.",
NotificationType.Error
)
)This provides a better user experience.

Join the conversation! Your thoughts help the community grow.