Retrieve messages and displaynamed of the folder

Julien Sarlat 21 Reputation points
2021-07-22T16:56:54.52+00:00

Hello,

I would like to retrieve all the messages in my inbox including the displayed name of the folder the messages are in in one call.

So far I onlw find this https://learn.microsoft.com/en-us/graph/api/user-list-messages?view=graph-rest-1.0&tabs=http that gives me the parentFolderId but not the displayed name of the folder ("inbox" for example)

How can I do?

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
39,147 questions
0 comments No comments
{count} votes

Accepted answer
  1. Glen Scales 4,436 Reputation points
    2021-07-22T23:45:08.353+00:00

    You can use the PidTagParentDisplay property https://learn.microsoft.com/en-us/office/client-developer/outlook/mapi/pidtagparentdisplay-canonical-property?WT.mc_id=M365-MVP-10145 which you request as a singleValueExtendedProperties like

    https://graph.microsoft.com/v1.0/me/messages?$expand=singleValueExtendedProperties($filter=id%20eq%20'String%200x0E05')  
    

    and it will return eg

               ],  
                "ccRecipients": [],  
                "bccRecipients": [],  
                "replyTo": [],  
                "flag": {  
                    "flagStatus": "notFlagged"  
                },  
                "singleValueExtendedProperties@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('1c...0')/messages('A...A%3D')/singleValueExtendedProperties",  
                "singleValueExtendedProperties": [  
                    {  
                        "id": "String 0xe05",  
                        "value": "Inbox"  
                    }  
                ]  
    
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.