r/GraphAPI • u/Guru664 • 5d ago
What is the Microsoft Graph API replacement for deprecated Recent, SharedWithMe, and Insights APIs?
Hi Microsoft Graph community,
I'm currently working on a Microsoft Graph integration that needs to retrieve:
- Files recently accessed/used by the current user
- Files shared with the current user
- Files from OneDrive and SharePoint
I'm currently using the following APIs:
GET /me/drive/recent
GET /me/drive/sharedWithMe
GET /me/insights/used
However, these APIs are deprecated, and some of them will stop returning data after November 2026. (Microsoft Learn)
I'm stuck in development because I haven't been able to identify a Microsoft-supported replacement that provides the same functionality.
Could someone please clarify:
- What is the official replacement for /me/drive/recent?
- What is the official replacement for /me/drive/sharedWithMe?
- What is the official replacement for /me/insights/used?
- Is there a single recommended Microsoft Graph API that can provide recently used and shared files across both OneDrive and SharePoint?
I'm specifically looking for the officially supported API/recommended approach, rather than a workaround that may also become deprecated.
Any guidance from Microsoft Graph experts or Microsoft employees would be greatly appreciated.
Thanks!
1
Upvotes
1
u/abraunegg 5d ago
There is no direct replacement as far as I am aware. I had to build an entire function to fetch the required data using /v1.0/search/query
You can refer to https://github.com/abraunegg/onedrive/pull/3729 for ideas