Hi @Ward Horsfall ,
You can follow this documentation on how to use search query for mail messages. The search applies to the body and attachments of messages in the signed-in user's own mailbox which means this API works only with delegated permission. To generate access token for this scenario please follow this documentation on access token with delegated permissions.
For this authorization method you need Tennent id, client id and client secret.
Hope this helps.
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.