1

I'm using trying to get default contacts folder. currently I'm trying testing them on graph api. if I https://graph.microsoft.com/v1.0/me/contacts, I can get all the contacts list correctly. For example,

"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('8fa9xxxx-4eb9-acb4xxxxx5707')/contacts",
"value": [
    {
        "@odata.etag": "W/\"EQAAAB........HYPlAACRIrzX\"",
        "id": "AAMkAGUyM2Exxxxxxxxxxxxxxxxxxxxxxxx.... xxQVwWHYPlAACRUWbVAAA=",
        "createdDateTime": "2024-04-15T01:39:57Z",
        "lastModifiedDateTime": "2024-04-15T01:39:59Z",
        "changeKey": "EQAAA.......YPlAACRIrzX",
        "categories": [],
        "parentFolderId": "AAMkAGUyM2xxxxxxxxxAAAAAEOAAA=",
        "birthday": null,
        "fileAs": "gisu123"..........
.......,

However, If I do https://graph.microsoft.com/v1.0/me/contactFolders there is no return.

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('8fxxxxxxxxxxxx5707')/contactFolders",
    "value": []
}

But it works, when I use parentfolder id with contactfolders.

https://graph.microsoft.com/v1.0/me/contactfolders/AAMkAGUxxxxxxxxxI3Ny1iMDUyLWI0OTxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxXBZC4AAAAAAEOAAA=
{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('8fa9a94f-1752-4eb9-acb4-a2eac51a5707')/contactFolders/$entity",
    "id": "AAMkAGUyM2xxxxxxxxxxxxxxxxxxAQDMA-lWCJwxSZ24LJrXBZCxxxxxOAAA=",
    "parentFolderId": "AAMkAGUyM2ExYxxxxxxx3Ny1iMDUyLWI0OTIyNzAyODVhMwAuAAAAxxxxxxxWkPkKe6D2sAQDMA-lWCJwxSZ24LJxxxxxAAAAAEIAAA=",
    "displayName": "Contacts"
}

However, this method is only possible when there is existing address on contacts. Is there way to get Contacts (default folder) directly?

1 Answer 1

1

It should be possible by using well-known name Contacts for default folder.

GET https://graph.microsoft.com/v1.0/me/contactFolders/contacts
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.