
Updating the owner column for a table in Dataverse from ADF, Azure Data Factory, can be a little confusing. Dataverse allows you to establish relationships between tables as lookup columns. To update a lookup column in ADF, you just need to assign it the GUID of the related record. So for example if you are updating the account table in Dataverse you can set the primary contact by mapping a guid into that column.
After your run the pipelines the copied account records will display the name of the primary contact, Joe Bloggs, in Dataverse.
The challenge with the Owner column is that it is a polymorphic column, meaning it can reference records from different tables. Specifically, the Owner column can hold the GUID of either a user or a team. Unlike a standard lookup column, updating a multi-table polymorphic column requires specifying both the table it relates to and the record’s GUID. To do this in ADF you need to add a mapping to a column called ownerid@EntityReference which specifies the table the ownerid refers to.
The ownerid entity reference column must be set to either “team” or “systemuser.” In my example, the source for the ADF pipeline was a SQL view that included a column for the ownerID (GUID) and another for the ownerid@EntityReference (string) mapping.
My ADF pipeline updated these records in Dataverse setting the owner as per the mapping.
I hope this helps if you’re having trouble mapping the Owner column in Dataverse from Azure Data Factory. The same approach can be used for other polymorphic multi-table lookup columns.