The process of building custom applications and tools that interact with Microsoft SharePoint, including SharePoint Online in Microsoft 365.
Hi @sahar fiuzati hagh ,
Per my test, the code will run to update the item which id is srcDriveItem.Id in await graphClient.Sites[srcSiteId].Drives[srcDrive.Drive.Id].Items[srcDriveItem.Id] which
equivalent to PATCH /sites/{site-id}/drive/items/{item-id}. If you print the srcDriveItem.Id out. It might different with the id in ParentReference.
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.