Skip to content
This repository was archived by the owner on Mar 7, 2020. It is now read-only.
This repository was archived by the owner on Mar 7, 2020. It is now read-only.

Requests got 404 error but work in Graph Explorer #8

@AlbertZick

Description

@AlbertZick

Hi ,
I'm trying to modify the code to learn Microsoft Graph API. When I send any requests that target is a file in Document Library in SharePoint, I get the 404 responses with 'message': 'The resource could not be found.'. However, I check the requests in Graph Explorer, and I get 200 responses. I use a business account, and I had set all permissions that need for file accessing.
The requests I used
GET https://graph.microsoft.com/v1.0/sites/xxxx/drives/<drive_id_1>/root:/<existing_path>/
GET https://graph.microsoft.com/v1.0/drives/<drive_id_1>/items/<item_id_1>/

Additionally, I check the following request and get different response from the Graph Explorer
GET https://graph.microsoft.com/v1.0/drives/<drive_id_1>/root/children

  • The response for my code (the value field is empty)
    {'@odata.context': "https://graph.microsoft.com/v1.0/$metadata#drives('<drive_id_1>')/root/children", 'value': []}
  • The response in Graph Explorer (the value field is not empty)
    { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#drives('<drive_id_1>')/root/children", "value": [ { "createdDateTime": "2018-12-20T18:04:06Z", "eTag": "\"{xxxx},1\"", "id": "xxxx", "lastModifiedDateTime": "2018-12-20T18:04:06Z", "name": "xxxx", "webUrl": "xxxx", "cTag": "\"c:{xxxxx},0\"", "size": 545056, "createdBy": { "user": { "email": "xxxx", "id": "xxxx", "displayName": "xxxx" } }, .... }, .... ] }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions