Closed MalekSmida closed 3 months ago
Thanks for raising this @MalekSmida . Have you tried testing the same on sdk version 6?
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
Issue
The methode for updating Metadata in SharePoint does not support nested files (unlike Microsoft Graph API)
Expected behavior
After uploading a file to SharePoint using this methode
Being able to update metadata of the uploaded file via this methode
Actual behavior
While the upload function works well, the update metadata method return 404:Not found
When testing the same API via postman
https://graph.microsoft.com/v1.0/sites/{{site-id}}/drives/{{drive-id}}/root:/{{folder-path}}/{{filename}}:/listItem/fields
to add metadata, it works fine with the same URL and on the same file.After investigation, we found that if we upload the file directly into the documents drive, the updating metadata works fine, while in a nested folder with the path
sharePointParameters.getFolderPath() + "/" + fileName
it does not workHere is the code that works:
Steps to reproduce the behavior
Framework Springboot 2.6.7
Used libraries microsoft-graph 5.0.0, azure-identity 1.11.0
Context After authentication via azure-identity, we are using microsoft graph api via Java SDK to upload file to SharePoint then adding metadata to it.