I’m new to Sharepoint API and when I hit this API https://graph.microsoft.com/v1.0/me/drive/sharedWithMe
It returns me list of all the files and folders shared with me in following format
**{
“@odata.context”: “https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.driveItem)”,
“value”: [
{
“createdDateTime”: “2024-06-20T12:23:32Z”,
“id”: “idValue”,
“lastModifiedDateTime”: “2024-06-20T12:23:32Z”,
“name”: “nameValue”,
“webUrl”: “webUrlValue”,
“size”: 0,
“lastModifiedBy”: {
“user”: {
details
}
},
"folder": {
"childCount": 1
},
"remoteItem": {
"createdDateTime": "2024-06-20T12:23:32Z",
"id": "idValue",
"lastModifiedDateTime": "2024-06-20T12:23:32Z",
"name": "NameOfFile",
"size": 0,
"webDavUrl": "webDavUrlValue",
"webUrl": "weburlValue",
"fileSystemInfo": {
"createdDateTime": "2024-06-20T12:23:32Z",
"lastModifiedDateTime": "2024-06-20T12:23:32Z"
},
"folder": {
"childCount": 1
},
"lastModifiedBy": {
"user": {
"email": "emailValue",
"id": "samepIDValue",
"displayName": "Sample Name"
}
},
"parentReference": {
"driveType": "business",
"driveId": "driveIdValue",
"id": "idValue",
"siteId": "siteIdValue"
},
"shared": {
"scope": "users",
"sharedDateTime": "2024-06-20T12:23:53Z",
"sharedBy": {
"user": {
"email": "name",
"id": "id",
"displayName": "displayNameValue"
}
}
},
"sharepointIds": {
"listId": "listIdValue",
"listItemId": "listItemIdValue",
"listItemUniqueId": "listItemUniqueIdValue",
"siteId": "siteIdValue",
"siteUrl": "site_URL",
"tenantId": "tenantIdValue",
"webId": "webIdValue"
}
}
},
{ rest of files}
]
}**
I want to cd into this OneDrive folder and access and upload items here. How can i do it ?
I’ve done some research but still can’t figure out how to access contents of specific folders that were shared with me .
I tried everything I can but none of them seems to work , there’s not much content on Microsoft official docs on how to acccess contents of sharedWithMe files using API.
On chatGPT and other platforms its showing me that if I hit this ( https://graph.microsoft.com/v1.0/me/drive/items/{folderId}/children) then it’ll work even for sharedWithMe files but this doesn’t seems to work, maybe I’m picking some wrong value as folder id.
Can someone please help me with this urgently ?