-
Notifications
You must be signed in to change notification settings - Fork 230
Closed
Description
Error in a request to download a file from a drive
Prerequisites
- Can you reproduce the problem? Yes.
- Are you running the latest version? Yes.
- Are you reporting to the correct repository? Yes.
- Did you perform a cursory search? Yes.
Description
I'm developing a API to manage files from a drive and I'm getting error when I try to download a file by his ID. There is no error when trying in Postman or when trying via Axios.
The request is:
GET https://graph.microsoft.com/v1.0/sites('${siteId}')/drives('${driveId}')/items('${fileId}')/content
Here is my code:
The Microsoft Graph Client, configured to get the token:
Here is where I'm trying to download the file:
Console Errors:
DEBUGGING PERCEPTIONS:
Here is the correct functioning of the .get(), the token is present. I got this example of other request that works fine:
Here is the wrong functioning of the .get(), the token is not present and then I get an Error:
Usage Information
@microsoft/microsoft-graph-client version - 2.1.0
Node Version - 12.18.4