Answering the Graph API bit of the question.
With Graph API, for a shared mailbox, you can access the message using the message-id and the user-id of the owner of the mails using Get Message.
When using delegated permissions you will need Mail.Read.Shared permission added to your app. See this thread for more.
GET https://graph.microsoft.com/v1.0/users/shared@contoso.com/messages
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('shared%40contoso.com')/messages(id)",
"value": [
{
"@odata.etag": "W/\"CQAAA...\"",
"id": "AQMk...AIf-wAAAA=="
},
{
"@odata.etag": "W/\"CQAAABYA...\"",
"id": "AQM...AAAIJPwAAAA=="
}
]
}