I'm trying to download some excel file from our sharepoint. I'm following instructions from this resource: https://docs.microsoft.com/en-us/graph/api/driveitem-get-content?view=graph-rest-1.0&tabs=http
when I try to call the endpoint from Postman, I get some gibberish and a pretty long one. the tutorial says I'm supposed to get a 302 response but I get a 200 response.
I also have all the permission granted for read write for Site and Files.
from postman, I translate the code to python. here's my code. I get the same result on my python script:
url = "https://graph.microsoft.com/v1.0/drives/<our_drive_id>/items/<target_file_id>/content"
payload={}
headers = {
'Content-Type': 'application/json',
'SdkVersion': 'postman-graph/v1.0',
'Authorization': f'Bearer {token}' # retrieved from an endpoint called prior
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response)
here is the response that I get:
I'm not really sure since I don't get an actionable error. Also the response that I get is different from the expected response stated in the tutorial.