How to list the deleted contacts by Microsoft Graph API

北战南征 提交于 2021-02-20 04:09:39

问题


I want to do a sync action in my client side, so need to know how to get all deleted contact list.

By the api (GET /me/contacts), I could get all contact list But it wastes much time when the user has large contacts.

This api (GET /me/contacts/{id}) tell us the contact is exist or not.
it is inefficient to check every contacts are deleted or not for me.

Which apis do I use? thanks for your help.


回答1:


Why not use the delta query preview in the /beta endpoint? That should do what you want.




回答2:


More efficient way for you to check which contacts were removed is getting just the list of contact ID's and then doing the diff between list of ID's returned by graph, and local list.

You can use query parameters to retrieve just the ID's of the contacts, instead of getting the whole objects.

Method url: https://graph.microsoft.com/v1.0/me/contacts?$select=id



来源:https://stackoverflow.com/questions/43132111/how-to-list-the-deleted-contacts-by-microsoft-graph-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!