My customer cannot download all outlook contacts by Graph API after they upgrade from exchange on-prem to office365

Tyler Cai 1 Reputation point
2022-12-15T08:41:40.4+00:00

After my customer upgrade from exchange on-prem to office365, they cannot download all contacts from outlook web. On the web page "outlook.office.com/people/", there are 1085 contacts totally, but our client can only download 829 contacts, see the log in "1.png". Our client use Graph API "https://graph.microsoft.com/v1.0/me/contacts/delta?$select=givenName,surname,emailAddresses,parentFolderId,homePhones,businessPhones,mobilePhone" with Prefer="odata.maxpagesize=200" to download contacts page by page. We download 829 contacts in 5 pages: 200, 200, 199, 198, 32. And the requests and response codes are correct. We got a deltalink in the last response: "@odata.deltaLink":"https://graph.microsoft.com/v1.0/me/contacts/delta?$deltatoken=eSToPwaVK5zeV1RmNBmxIF......WvMfRI5QVLXIB3E"

My question: Are there any contacts that office365 service didnot return by Graph API ?

270910-1.png270971-2.png

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,309 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Srinivasa Rao Darna 6,761 Reputation points Microsoft External Staff
    2022-12-23T16:01:22.947+00:00

    Hi @Tyler Cai ,

    To get all the contacts use this GET /me/contacts Graph API endpoint.

    Delta is generally used get a set of contacts that have been added, deleted, or updated in a specified folder.
    A delta function call for contacts in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contacts in that folder. Reference documentation.

    As you have mentioned, that before getting @odata.deltaLink you are not able to see all the contacts with @odata.nextLink. I would recommend you to raise a support case with Microsoft Graph, a Support Engineer will be able to assist you better. You can raise support ticket from
    https://portal.azure.com/#view/Microsoft_Azure_Support/HelpAndSupportBlade/~/overview or https://admin.microsoft.com/#/support/requests.
    You can also raise a support case with Microsoft, a specialized Support Engineer will be able to assist you better.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.