Document with quick parts properties in sharepoint not working as expected with graph api

Lemo_admin 0 Reputation points

I have in my sharepoint site a library "Documents" with a .docx document with added quick parts fields coming from custom columns of my site.

If I copy this original .docx using the sharepoint ui to any other folder and assign metadata to the columns then the properties are filled correctly into the document.

But when I do the copy of the original .docx with graph api using an admin app with all the necesssary permissions then the copy is done correctly but when I add metadata in the columns the properties are not filled into the document.

I don't understand which is the difference because the copy is done using the same source .docx and the metadata columns are filled in the same way (through sharepoint ui)

Do you know which could be the issue?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,385 questions
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,251 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 33,641 Reputation points Microsoft Vendor

    Hi @Lemo_admin,

    Per my test, when I copy the file on SharePoint UI. Some metadata will change. The modified column will be updated to the current date and user but the Author won't be updated. If I copy the file by graph api, the Author will be updated to the current user.

    According to my understanding, copy file by UI only change the path of the file. So the modified column will be changed and the Creator column remains the same. When we use the graph api to copy a file, the api will create a new item indead. So the Creator column will be current user and date. Please refer to the document

    In summary, the graph api created a new item in a new path but the UI will copy the file and only change the path of item. The difference cause the different result

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.