Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft.SharePoint (minor) moving from onedrive API in some components #295

Merged
merged 3 commits into from
Dec 11, 2024

Conversation

ZbynekPelunek
Copy link
Contributor

@ZbynekPelunek ZbynekPelunek commented Nov 28, 2024

There are reported issues in 4 components:

  • ListSites
  • GetFile
  • DownloadFile
  • MoveFileOrFolder

In multiple of them there was reported error "Circular reference" I found out that it is from the onedrive-api library, so I had to change the components to using REST API, affected components:
ListSites
GetFile
MoveFileOrFolder (currenly returns an error when the move is successful)

DownloadFile and GetFile are reported to trigger multiple times for 1 file, I couldn't replicate this issue

@ZbynekPelunek
Copy link
Contributor Author

The MoveFileOrFolder currenly returns an error when the move is successful. I have opened a question on Microsoft knowledge base https://learn.microsoft.com/en-us/answers/questions/2125407/move-a-driveitem-to-a-new-folder-api-returns-404-o

@ZbynekPelunek
Copy link
Contributor Author

This is the final answer from Microsoft:

After analysis, because this movement is already a cross-drives movement, but according to the document description, this behavior is not allowed:

image

So, an error is expected, but the fact that the file can be moved successfully indicates that the endpoint is not perfect, and you can either give feedback here or, if you don't mind, continue to use the endpoint until it is fixed.

But for moving files across Drives, we recommend that you use the Copy item endpoint.

So technically the error is correct but the result is wrong. It either should not return the error while moving the file across drives or return an error and don't move the item. I don't think that we should check if someone is moving a file from one drive to another, so I will just mention it in the component that when you do that, an error is expected.

@ZbynekPelunek ZbynekPelunek marked this pull request as ready for review December 10, 2024 13:16
@jirihofman jirihofman merged commit d43424a into clientIO:dev Dec 11, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants