Share via

Can the emails for a user be filtered so that draft emails are not returned

geetarman 26 Reputation points
2022-09-12T10:44:32.867+00:00

I am wanting to process a users email message using graph api but I dont want to process draft emails. For performance reasons i want to perform a search and exclude any draft emails for being returned. It doesn't look possible by the normal search filters (ie like you can with received date time etc).
Is there any way to do it?

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Answer accepted by question author
  1. RajeshKumarMSFT 1,981 Reputation points Microsoft External Staff
    2022-09-12T14:51:14.843+00:00

    Hi @geetarman ,

    Hope you are doing well,

    You can achieve filtering draft emails using below endpoint
    https://graph.microsoft.com/v1.0/me/messages?$**filter=isDraft ne true**

    Above endpoint returns all email except draft messages.
    240133-image.png

    Refer -
    https://learn.microsoft.com/en-us/graph/api/user-list-messages?view=graph-rest-1.0&tabs=http
    For additional info check the link.
    https://learn.microsoft.com/en-us/answers/questions/656200/graph-api-to-filter-results-on-39from39-and-39subj.html

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


1 additional answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

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