Create folder in root is failing with 404

Abdulkareem Nalband 71 Reputation points
2021-10-12T06:40:42.24+00:00

We are trying to create folder in users one drive root folder

by sending following request

POST /v1.0/me/drive/root/childern HTTP/1.1
Host: graph.microsoft.com
Authorization: Bearer <snipped>
Content-Type: application/json
Content-Length: 34

{"name":"DecisionsQQ","folder":{}}

but it is failing with 404

HTTP/1.1 404 Not Found
Cache-Control: no-cache
Content-Encoding: gzip
Content-Type: application/json
Date: Tue, 12 Oct 2021 06:39:53 GMT
Strict-Transport-Security: max-age=31536000
Transfer-Encoding: chunked
Vary: Accept-Encoding
client-request-id: c0455943-6ba2-468e-a199-03d642c8a455
request-id: c0455943-6ba2-468e-a199-03d642c8a455
x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"South India","Slice":"E","Ring":"2","ScaleUnit":"000","RoleInstance":"MA1PEPF00001F5F"}}

{
    "error": {
        "code": "itemNotFound",
        "innerError": {
            "client-request-id": "c0455943-6ba2-468e-a199-03d642c8a455",
            "date": "2021-10-12T06:39:54",
            "request-id": "c0455943-6ba2-468e-a199-03d642c8a455"
        },
        "message": "Item not found"
    }
}
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,509 questions
0 comments No comments
{count} votes

Accepted answer
  1. Danstan Onyango 3,736 Reputation points Microsoft Employee
    2021-10-15T06:46:22.933+00:00

    You have a typo in your request path. childern should be children.

    POST https://graph.microsoft.com/v1.0/me/drive/root/children
    {
        "name": "New Folder",
        "folder": {},
        "@microsoft.graph.conflictBehavior": "rename"
    }
    # Response
    {
        "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('2f43...')/drive/root/children/$entity",
        "createdDateTime": "2021-10-15T06:43:20Z",
        ...
    }
    

0 additional answers

Sort by: Most helpful