Graph mail api - get list of emails and include outlook custom columns

Zarko Petrovic 40 Reputation points
2023-08-28T10:51:51.2433333+00:00

Hi,

We are using MS Graph api to fetch user's emails from Outlook.

Is there a way to fetch and filter by values of custom columns added in Outlook?

I have tried adding $expand to the odata query but that didn't work.

I tried something like this i Graph explorer:

https://graph.microsoft.com/v1.0/me/messages?$select=id,lastModifiedDateTime,from,toRecipients,subject&$expand=fields

But I am getting an BadRequest (400) response:

Parsing OData Select and Expand failed: Could not find a property named 'fields' on type 'microsoft.graph.message'.

Thanks,

Zarko

Microsoft Graph Mail API
Microsoft Graph Mail API
A Microsoft API that supports accessing data in users' primary mailboxes and in shared mailboxes.
909 questions
0 comments No comments
{count} votes

Accepted answer
  1. TH-4749-MSFT 3,285 Reputation points
    2023-08-28T18:13:56.25+00:00

    Hello Zarko Petrovic,

    Thanks for reaching out. There is no property called fields in the message object hence you are receiving the Bad Request error. The below article lists all the properties of the message object and these properties are the ones returned in the /messages api call response.

    https://learn.microsoft.com/en-us/graph/api/resources/message?view=graph-rest-1.0

    Retrieval of custom columns is not supported. I would suggest posting your query on the Graph feedback forum.

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

    Thanks.

    0 comments No comments

0 additional answers

Sort by: Most helpful