Hi @Stephan Methner ,
The restore operation will only restore the file to the location of the current file, and cannot restore the file to other folders or libraries. To download files from OneDrive in a JavaScript app you cannot use the /content API, since this response with a 302 redirect. A 302 redirect is explicitly prohibited when a CORS preflight is required, such as when providing the Authorization header.
You could take a look at this document:Using the OneDrive API in JavaScript apps (CORS support)
If the response is helpful, please click "Accept Answer" and upvote it.
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.