I’m trying to make an HTTP Get call to Microsoft.Graph to retrieve data from files and folders stored in an application’s Root folder.
The following calls work correctly:
https://graph.microsoft.com/v1.0/me/drive/special/approot:/my_file.txt
https://graph.microsoft.com/v1.0/me/drive/special/approot:/Folder/image.png
Both of these calls return full JSON files.
For example, the second call returns:
{
“@odata.context”: “https://graph.microsoft.com/v1.0/$metadata#users(‘user%40outlook.com’)/drive/special/$entity”,
“@microsoft.graph.downloadUrl”: “https://public.am.files.1drv.com/y4mhyIFsH6p4JLCJ9ytqAXo_3wNXX_jR5wV2c5GZFo05b8vCDUGE-fMRxoNqksiR4ZvLa1P71bTQ6iG6Q5iPqpXU7go1UX3-pydXv94EMorZ qEqjYcQabXDcVMt3FhH8QxRxbFCurpSiLAlFkYPzbp31mKxsLItuSm0OeiySvAGusGj5LpHZd7jmcq61S1IMfg5z2wXGmBpqV5jqpM22WdE11TzthG11y7E-e3OsD-hlhU5AtJ8kcn9 yXX1AbW2kTgv”,
“createdDateTime”: “2023-11-08T09:18:56.38Z”,
“cTag”: “aYzoyNEVFMTYzQzMwQTY2QTghODQ2OS4yNTc”,
“eTag”: “aMjRFRTE2M0MzMEE2NkE4ITg0NjkuMw”,
“id”: “24EE163C30A66A8!8469”,
“lastModifiedDateTime”:“2023-11-08T09:18:57.553Z”,
“name”: “image.png”,
“size”: 33004,
“webUrl”: “https://1drv.ms/i/s!AKhmCsNj4U4CwhU”,
“reactions”: {
“commentCount”: 0
},
“createdBy”: {
“application”: {
“displayName”: “OneDrive”,
“id”: “481710a4”
},
“user”: {
“displayName”: “user”,
“id”: “24ee163c30a66a8”
}
},
“lastModifiedBy”: {
“application”: {
“displayName”: “OneDrive”,
“id”: “481710a4”
},
“user”: {
“displayName”: “user”,
“id”: “24ee163c30a66a8”
}
},
“parentReference”: {
“driveId”: “24ee163c30a66a8”,
“driveType”: “personal”,
“id”: “24EE163C30A66A8!8468”,
“name”: “Folder”,
“path”: “/drive/root:/Applications/COM-DOC/Folder”
},
“file”: {
“mimeType”: “image/png”,
“hashes”: {
“quickXorHash”: “cBRrXcn6jUfy/vaOXLXSb/bimXE=”,
“sha1Hash”: “72EF3914B7DF4ABD995A159FAFD83E569DEBAFF2”,
“sha256Hash”: “0F02D6E8D21CBF3D683B30B6248986824BE47902B189E9BDA3F76C0B8D9CD06B”
}
},
“fileSystemInfo”: {
“createdDateTime”: “2023-11-08T09:18:56.38Z”,
“lastModifiedDateTime”: “2023-11-08T09:18:56.38Z”
},
“picture”: {
“height”: 600,
“width”: 600
},
“photo”: {}
}
But the following call does not work:
https://graph.microsoft.com/v1.0/me/drive/special/approot:/Folder
It does not output an error, but only returns the JSON:
{
“@odata.context”: “https://graph.microsoft.com/v1.0/$metadata#users(‘user%40outlook.com’)/drive/special(‘approot%3A’)/folder”
}
Why is the data returned not complete?
But, if on OneDrive there is a folder named “MyFolder”, reading it via the URL
https://graph.microsoft.com/v1.0/me/drive/special/approot:/MyFolderworks perfectly.
So I think “Folder” is a reserved word with a special meaning.
Question: how do I access a folder called “Folder” or “folder”?
Another question is there, in the same context, other reserved keywords?
Best regards