I am new to Microsoft Graph API. The requirement on our application is to collect the latest email based on expected subject and collect the attachment of the email (CSV format).
This is working fine already when using the queries below but using 2 GET requests:
First is for collecting the latest email:
https://graph.microsoft.com/v1.0/me/messages?$select=id,hasAttachments&$top=1&$filter=subject eq '{subject}'
Second is for collecting the attachment by passing the id returned from the first query:
https://graph.microsoft.com/v1.0/me/messages/{id}/attachments
Question: Is there a way to just merge this request into one to make the code even better?
Thank you!