We encountered a severe bug in Microsoft outlook. Two contacts have the same unique identifier. Both the contacts are present in same folder in outlook.
{
"@odata.etag":"W/"EQAAABYAAAC8DOd9nfEKQIKH9B+wE/6tAAMS+rHg"",
"id":"AAMkAGZmZDhjMmMwLWM5YWYtNGQ4My1iNjY3LTcyMmY1ZDJjMGQyYQBGAAAAAAA1hjIPSspAQpY74RqZjH0hBwC8DOd9nfEKQIKH9B_wE-6tAAMSuJSLAAC8DOd9nfEKQIKH9B_wE-6tAAMSuJroAAA=",
"displayName":"mac mac"
}
....
{
"@odata.etag":"W/"EQAAABYAAAC8DOd9nfEKQIKH9B+wE/6tAAMS+onF"",
"id":"AAMkAGZmZDhjMmMwLWM5YWYtNGQ4My1iNjY3LTcyMmY1ZDJjMGQyYQBGAAAAAAA1hjIPSspAQpY74RqZjH0hBwC8DOd9nfEKQIKH9B_wE-6tAAMSuJSLAAC8DOd9nfEKQIKH9B_wE-6tAAMSuJrOAAA=",
"displayName":"smaran13"
}
First contact was created using Outlook beta batch API's.
Second contact was created inside Outlook Web App in Chrome browser.
Both the id's are same.
Though contact was created using Outlook beta API, still duplicate unique identifier is a severe issue.
We are unable to fetch the first contact by id using Microsoft graph API.
Fetching the contact using id in Microsoft graph API gives only the second contact.
Only way to get the first contact is to get all contacts
Here is a sample of the code
Create Contact API
POST /api/beta/$batch
Host: outlook.office.com
Authorization: Bearer <access_token>
Content-Type: multipart/mixed; boundary=batch_ZohoGadgets
Accept: multipart/mixed
Prefer: odata.continue-on-error
--batch_881a83c8-4fdb-11e9-8647-d663bd873d93
Content-Type: application/http
Content-Transfer-Encoding: binary
POST /api/beta/me/contacts HTTP/1.1
Content-Type: application/json;odata=verbose
{"Surname":"Sample Name"}
--batch_881a83c8-4fdb-11e9-8647-d663bd873d93
Get all contacts API
GET /v1.0/me/contactfolders/{Id}/contacts?$select=id,displayName&$top=999
Host: graph.microsoft.com
Authorization: Bearer <access_token>
There are many such contacts with duplicate id's in our account.