Copy/Move Item api is not throwing exception when i provide invalid parentReference.id with in drive

221 views Asked by At

Both Move and copy apis are successful when we provide invalid ParentReference.id with in drive. And it is copying the file to same folder as source item. Expected Behaviour : It should throw invalid parentReferece.id error. This functionality is working fine when we provide invalid parentReference.path.

Copy Item : POST https://graph.microsoft.com/v1.0/drives/b!dckkz8p7EkKltFwLt5o0QJ6VxtVc1UlOlv0XvR1bhLAo3oh17BLfTIZmGKhBkrry/root:/home/new-item.jpg:/microsoft.graph.copy

{'name':'test5.jpg','parentReference':{'driveId':'b!dckkz8p7EkKltFwLt5o0QJ6VxtVc1UlOlv0XvR1bhLAo3oh17BLfTIZmGKhBkrry','id':'fgdftgarsgdreg'}}

Move Item : PATCH https://graph.microsoft.com/v1.0/drives/b!dckkz8p7EkKltFwLt5o0QJ6VxtVc1UlOlv0XvR1bhLAo3oh17BLfTIZmGKhBkrry/root:/home/new-item.jpg:

{'name':'test6.jpg','parentReference':{'id':'fgdftgarsgdreg'}}

0

There are 0 answers