Issue with Person-Type Column in SharePoint List Connection to Synapse

Harikrishnan Arayakeel 25 Reputation points
2025-03-25T16:55:05.7933333+00:00

Hi, I attempted to connect a SharePoint list to Synapse, using it as source and sink to new SQL table. I created a SharePoint link service and utilized an OData query in Copy Data. However, the person-type column is only returning data in int32 format. How can I resolve this issue?

I tried the following codes:

1.https://<your-sharepoint-site-url>/_api/web/lists/getbytitle('<sharepoint-list>')/items?$select=Title,New_x0020_Owner/Title&$expand=New_x0020_Owner and

  1. https://<your-sharepoint-site-url>/_api/web/lists/getbytitle('<sharepoint-list>')/items?$select=Title,NewOwner/Title&$expand=NewOwner.

Despite trying both, it is returning all fields (It should return only selected) without the person name. Also made sure SharePoint got the exact column name What is the best way to get the correct data, or is there any other setting outside the query that I need to adjust?

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,374 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Chandra Boorla 14,585 Reputation points Microsoft External Staff Moderator
    2025-03-25T19:02:49.43+00:00

    @Harikrishnan Arayakeel

    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.


  2. Amira Bedhiafi 33,071 Reputation points Volunteer Moderator
    2025-03-25T21:11:21.47+00:00

    You are using the internal name of the person field (you can find this in list settings → column → URL).

    Your OData query uses both $expand and $select correctly.

    For a person-type column called New_x0020_Owner, your OData query should look like this:

    https://<your-sharepoint-site>/_api/web/lists/getbytitle('YourList')/items?$select=Title,New_x0020_Owner/Title&$expand=New_x0020_Owner
    

    $expand=New_x0020_Owner tells it to get the full object.

    $select=Title,New_x0020_Owner/Title tells it to return the sub-property Title from that object (i.e., the person’s name).

    Workarounds to help you :

    Option 1: Use an Azure Function or Logic App as a Proxy

    Create an Azure Function or Logic App to query SharePoint via REST API using HttpClient.

    Parse the response and return flattened JSON, e.g., with the user’s actual name.

    Use this as your Synapse/ADF source.

    Option 2: Use Power Automate to Sync Data

    Use Power Automate (Flow) to:

    Extract data from SharePoint (including person name).

      Write it to a staging Azure SQL table or blob.
      
         Connect Synapse to that data.
         
    

    Option 3: Use SharePoint List Export via Graph API

    Graph API tends to return richer data models.

    You can call /sites/{site-id}/lists/{list-id}/items with expand=fields.

    • More consistent than OData in some cases, though it takes setup (Azure App Registration, permissions, ....).

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.