Applies to Product – Microsoft Dataverse
What’s happening?
The UpsertMultiple action using the HTTP with Entra ID (preauthorized) connector is only functioning for updates and not for inserts when attempting to create new records in the Dataverse.
Reason:
The UpsertMultiple action fails with an unexpected error when trying to insert records that do not already exist in the Dataverse. This may arise due to the presence of duplicate keys in the request body, specifically when the same unique key is specified multiple times.
Resolution:
- When constructing the JSON body for the UpsertMultiple action, ensure that the unique key is not specified more than once. For example, if the body originally looks like this:
"Targets": [
{
"ppcoe_name": "unique_value",
"ppcoe_accountname": "account_name",
"######.type": "Microsoft.Dynamics.CRM.ppcoe_powerplatformconnection",
"######.id": "record_id"
}
]
}
Change it to:
{
"Targets": [
{
"ppcoe_accountname": "account_name",
"######.type": "Microsoft.Dynamics.CRM.ppcoe_powerplatformconnection",
"######.id": "record_id"
}
]
}
- Test the UpsertMultiple action again after making the above changes to confirm that it now works for inserts.
- If the issue persists, consider simplifying the batch size by reducing the number of records being sent in a single UpsertMultiple request to isolate the problem.
