As I understand that you are encountering an issue where the Person-type column
in your SharePoint List is returning an int32
(ID) instead of the person's name when querying it via OData in Synapse. This happens because, by default, SharePoint stores Person-type fields as lookup fields, meaning you need to explicitly expand them to retrieve additional details like Title
(name) or Email
.
Here are few troubleshooting steps that might help you in resolving the issue:
Ensure Correct OData Query Format
Use the following query in your Copy Data activity:
https://<your-sharepoint-site-url>/_api/web/lists/getbytitle('<sharepoint-list>')/items?$select=Title,New_x0020_Owner/Title,New_x0020_Owner/EMail&$expand=New_x0020_Owner
-
$select=Title,New_x0020_Owner/Title,New_x0020_Owner/EMail
--> Retrieves only the required fields. -
$expand=New_x0020_Owner
--> Ensures that SharePoint provides full user details instead of just the ID.
Verify the Column Internal Name
If your column has spaces (e.g., New Owner
), SharePoint encodes spaces as _x0020_
.
You can check the correct internal name in SharePoint by navigating to List Settings --> Column Name --> Inspect URL.
Test API Outside of Synapse (Optional)
Open the above query in Postman or a web browser.
If the correct data is returned in Postman but not in Synapse, the Synapse OData connector may be ignoring $expand
.
Workaround - Using an Azure Function or Power Automate
If Synapse does not properly retrieve expanded data, consider using Power Automate or an Azure Function to extract SharePoint data and store it in a staging table before loading it into Synapse.
I hope this information helps. Please do let us know if you have any further queries.
Kindly consider upvoting the comment if the information provided is helpful. This can assist other community members in resolving similar issues.
Thank you.