0
votes

I'm working on http requests with Microsoft Graph and Postman. I've been trying to connect to files I have stored in my drive with GET https://graph.microsoft.com/v1.0/me/drive/items/{itemid} with headers for client_id: {the id} client_secret: {the secret}, Authorization: {bearer token}, Resource: https://graph.microsoft.com/. The error I receive is: error image

I'm able to Make this request on Microsoft Graph Explorer, but when I leave the website, I am no longer able to make the request. I've looked all over and I'm not sure what I can do to fix this. I've checked "Unable to retrieve user's mysite URL" OneDrive Request this stack exchange question, however my Office subscription is not in a lock-out state. Let me know if you need anymore information and thanks for the help!

1

1 Answers

0
votes

I figured out what was going wrong... I found this on gitHub: https://github.com/OneDrive/onedrive-api-docs/issues/530. The post discusses how my error may come up with personal oneDrive accounts. I transferred the application to a business oneDrive user within Azure AD, specified which user I wanted to access in the request, then specified which drive I wanted to use. After this I was able interact with the file in my drive. Apparently personal oneDrive accounts don't have a mysite, but business oneDrive accounts do. This is what caused my error.