Microsoft Exchange Query Component

I’m working on a project where we need to fetch incoming emails using Matillion and load the email content into our Snowflake data warehouse. Our company has set up a dedicated mailbox (mb_xyz@outlook.com) on Microsoft Office 365 for this use case. To achieve this, I used the Microsoft Exchange Query component in Matillion, where I successfully set up authentication with Azure Active Directory (AAD) using the Manage OAuth feature in Matillion. I also configured the connection to load the fetched data into a Snowflake table via a managed stage in AWS S3.

Successfully able to query and load data into Snowflake from Inbox, Contacts, and Groups when selecting them as the Data Source. But When I try to fetch data using Messages/MessageAttachments as the Data Source, the component fails with the following error:

[MailboxNotEnabledForRESTAPI] The mailbox is either inactive, soft-deleted, or is hosted on-premise.

I need to query the necessary fields, such as ID, subject, body_content, etc., from Messages/MessageAttachments in the mailbox (mb_xyz@outlook.com). How can I resolve this error and successfully query email messages and attachments? Could someone provide the correct SQL-like syntax to retrieve these records using the Microsoft Exchange Query component?

Hi @sagnikkundu96

Thanks for your post, I have raised this as a case for you with our support team as they will need to look into logs and other potentially sensitive information.

If you need anything else, please let me know.

Kind regards, Joe