I want to download the content of a file in order to store it in local machine, the request I sent is:
https://graph.microsoft.com/v1.0/me/drive/root:/test/file1.docx:/content
get.addHeader("Accept", "application/octet-stream"),
get.addHeader('Authorization', authcode);
get.addHeader('Cache-Control', 'no-store');
the response code is 200 not 302. When I use my personal account the response header is jason object which has Content-Location (it is a download url). So far so good. But when I use business account, the response code is 200 but there is no downaloadurl/contentlocation/ or anything similar in the response header. All the permissions I think is fine, the scope in Azure is set to "Files.ReadWrite.All".
PS: I don't want to download the file, I want to download the filecontent. Any suggestions?
Update: looks like this is known issue, there is already a case for that https://github.com/microsoftgraph/microsoft-graph-docs/issues/5637