API REST
2 TopicssharedWithMe returns only one item
A request from a standalone application to the https://learn.microsoft.com/en-us/graph/api/drive-sharedwithme endpoint returns only one item. Scopes used for authorization are: files.readwrite.all, group.readwrite.all, sites.readwrite.all, offline_access user.read When calling the same endpoint https://developer.microsoft.com/en-us/graph/graph-explorer, all shared items are returned. Result from application: { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.driveItem)", "value": [ { "createdDateTime": "2025-11-13T18:48:46Z", "id": "700DF30854FEF749!sd0cb731281c141acb1bf78fed133f933", "lastModifiedDateTime": "2025-11-13T18:48:46Z", "name": "saĝa-simio", "webUrl": "https://onedrive.live.com?cid=700df30854fef749&id=700DF30854FEF749!sd0cb731281c141acb1bf78fed133f933", "size": 0, "createdBy": { "user": { "email": "email address removed for privacy reasons", "id": "email address removed for privacy reasons", "displayName": "Saĝa Simio" } }, "lastModifiedBy": { "user": { "email": "email address removed for privacy reasons", "id": "email address removed for privacy reasons", "displayName": "Saĝa Simio" } }, "fileSystemInfo": { } Note that only one item is returned. Result from Graph Explorer: { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.driveItem)", "@microsoft.graph.tips": "Use $select to choose only the properties your app needs, as this can lead to performance improvements. For example: GET me/drive/microsoft.graph.sharedWithMe?$select=audio,bundle", "value": [ { "createdDateTime": "2025-11-13T18:48:46Z", "id": "700DF30854FEF749!sd0cb731281c141acb1bf78fed133f933", "lastModifiedDateTime": "2025-11-13T18:48:46Z", "name": "saĝa-simio", "webUrl": "https://onedrive.live.com?cid=700df30854fef749&id=700DF30854FEF749!sd0cb731281c141acb1bf78fed133f933", "size": 0, "createdBy": { "user": { "email": "email address removed for privacy reasons", "id": "email address removed for privacy reasons", "displayName": "Saĝa Simio" } }, "lastModifiedBy": { "user": { "email": "email address removed for privacy reasons", "id": "email address removed for privacy reasons", "displayName": "Saĝa Simio" } }, "fileSystemInfo": { "createdDateTime": "2025-11-13T18:48:46Z", "lastModifiedDateTime": "2025-11-13T18:48:46Z" }, "folder": { "childCount": 1, "view": {} }, "remoteItem": { "createdDateTime": "2025-11-13T18:48:46Z", "id": "700DF30854FEF749!sd0cb731281c141acb1bf78fed133f933", "lastModifiedDateTime": "2025-11-13T18:48:46Z", "name": "saĝa-simio", "size": 0, "createdBy": { "user": { "email": "email address removed for privacy reasons", "id": "email address removed for privacy reasons", "displayName": "Saĝa Simio" } }, "fileSystemInfo": { "createdDateTime": "2025-11-13T18:48:46Z", "lastModifiedDateTime": "2025-11-13T18:48:46Z" }, "folder": { "childCount": 1, "view": {} }, "lastModifiedBy": { "user": { "email": "email address removed for privacy reasons", "id": "email address removed for privacy reasons", "displayName": "Saĝa Simio" } }, "parentReference": { "driveType": "personal", "driveId": "700df30854fef749" }, "shared": { "scope": "users", "sharedDateTime": "2025-11-13T19:16:19Z", "owner": { "user": { "id": "700df30854fef749", "displayName": "Saĝa Simio" } }, "sharedBy": { "user": { "email": "email address removed for privacy reasons", "id": "email address removed for privacy reasons", "displayName": "Saĝa Simio" } } }, "sharepointIds": { "listId": "a5aff78d-98ee-4b34-b35b-f4fe365ebd74", "listItemId": "184", "listItemUniqueId": "d0cb7312-81c1-41ac-b1bf-78fed133f933", "siteId": "87dbe7ee-ae0c-4854-82e7-d56d982fef54", "siteUrl": "https://my.microsoftpersonalcontent.com/personal/700df30854fef749", "webId": "9d8b91c3-b0b9-45d1-83e4-17babde0d1dc" } } }, { "createdDateTime": "2025-11-13T18:24:59Z", "id": "D26CADA368C1131F!116", "lastModifiedDateTime": "2025-11-13T18:24:59Z", "name": "Beastie", "webUrl": "https://onedrive.live.com?cid=d26cada368c1131f&id=D26CADA368C1131F!116", "size": 0, "createdBy": { "user": { "email": "email address removed for privacy reasons", "id": "email address removed for privacy reasons", "displayName": "Faerie Graceful" } }, "lastModifiedBy": { "user": { "email": "email address removed for privacy reasons", "id": "email address removed for privacy reasons", "displayName": "Faerie Graceful" } }, "fileSystemInfo": { "createdDateTime": "2025-11-13T18:24:59Z", "lastModifiedDateTime": "2025-11-13T18:24:59Z" }, "folder": { "childCount": 1, "view": {} }, "remoteItem": { "createdDateTime": "2025-11-13T18:24:59Z", "id": "D26CADA368C1131F!116", "lastModifiedDateTime": "2025-11-13T18:24:59Z", "name": "Beastie", "size": 0, "createdBy": { "user": { "email": "email address removed for privacy reasons", "id": "email address removed for privacy reasons", "displayName": "Faerie Graceful" } }, "fileSystemInfo": { "createdDateTime": "2025-11-13T18:24:59Z", "lastModifiedDateTime": "2025-11-13T18:24:59Z" }, "folder": { "childCount": 1, "view": {} }, "lastModifiedBy": { "user": { "email": "email address removed for privacy reasons", "id": "email address removed for privacy reasons", "displayName": "Faerie Graceful" } }, "parentReference": { "driveType": "personal", "driveId": "d26cada368c1131f" }, "shared": { "scope": "users", "sharedDateTime": "2025-11-13T18:41:30Z", "owner": { "user": { "id": "d26cada368c1131f", "displayName": "Faerie Graceful" } }, "sharedBy": { "user": { "email": "email address removed for privacy reasons", "id": "email address removed for privacy reasons", "displayName": "Faerie Graceful" } } }, "sharepointIds": { "listId": "5d31fd1e-38af-4117-b637-c1a0f7d5ca95", "listItemId": "4", "listItemUniqueId": "68c1131f-ada3-206c-80d2-740000000000", "siteId": "74111012-f9e7-4940-ad60-5e53a21e2d3c", "siteUrl": "https://my.microsoftpersonalcontent.com/personal/d26cada368c1131f", "webId": "f1ea2ab8-b5ee-4c93-8ce2-6c12700c226a" } } } ] } Any tips or suggestions are welcome.13Views0likes0CommentsOneDrive API - createLink with type "embed" returns dead urls
Hello. I've just started using OneDrive Rest API (I'm using https://github.com/OneDrive/onedrive-sdk-python if that's important). What I'm trying to accomplish is to get embed url for some pictures from OneDrive. I get an error while using https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_createlink?view=odsp-graph-online with type = "embed". I receive an url in format "https://onedrive.live.com/embed?resid=abcdef&authkey=123456" that leads to non-working page: If I try to get link from onedrive website interface (using "Embed" option) it works fine but it's in different format (https://yfzapq.am.files.1drv.com/abcdefg123456?height=504&width=504). Am I missing something? Is there way to get working embed urls via OneDrive API? PS I've found that some people also receiving the same issue - https://stackoverflow.com/questions/58805214/onedrive-rest-api-embed-download-url What I've also found that in 2016 ember urls were unavailable in API (https://github.com/OneDrive/onedrive-api-docs/issues/102). Maybe nothing changed since then.1.7KViews0likes1Comment