Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,788 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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"
}
}
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",
...
}