python-o365
python-o365 copied to clipboard
Copy and Move Operations Suddenly Not Working
I've been using this API for several years without issues. It's wonderful. However, I've noticed suddenly in the last few days that my copy and move operations are not working for the SharePoint API. When trying to copy something, it's confusing the target for the parent, yielding an error that there is already something there with the same name, even if specifying the target and name explicitly.
ERROR:O365.connection:Client Error: 400 Client Error: Bad Request for url: https://graph.microsoft.com/v1.0//sites/welocalize.sharepoint.com,aaffe077-92eb-4711-b616-bd407fd56f2f,0870ef06-4bc7-4227-a6d8-10df493070c3/drive/items/01R246IS7WCJL2Q4FGRRDIAIWQ6UMM2RIY/copy | Error Message: At least one of 'parentReference.id', 'parentReference.path', 'parentReference.sharepointIds' or 'name' must be provided for a copy operation.
Traceback (most recent call last):
File "/Users/welocalize/PycharmProjects/weautomate/.venv/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3441, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "
When the move operation is called, it seems to work fine, returns True, but nothing is moved in the actual folder. I've been trying to debug this for a bit now and am having no luck.
Seems odd as it used to work... Maybe some api change on the microsoft side. don't know and also I don't have the time to investigate this right now