Accessing mass messages using graph api

I am curious if there is a better api call to search all users emails through the graph api? I am looking to create a management tools to search emails.

Right now, I am using the following two api call to go through. Get all users in my api, and then grab all messages for each users. This process is long, i am just curious if there is a better graph api call that does this functionality?

  1. https://graph.microsoft.com/v1.0/users
  2. https://graph.microsoft.com/v1.0/users/{userPrincipal}/messages?=contains(subject,'{title}')

This is however a slow process?, Going through is painfully to go through each users, then searching all of there inbox is there a better api to search all messages in our system?


Unfortunately there is no standalone endpoint for Graph API to access or search for messages across all users emails.