Export Exchange Online Message Trace to Database
Prerequisites
Entra ID Application Registration
Azure Automation Account
Understanding of PowerShell
Self-Signed Certificate for Certificate Based Authentication, in PFX format
Enable the Resource Provider
The subscription where this is being setup may not have the Resource Provider enabled. To do this:
Go to the Subscription
Under Settings go to Resource providers
Search for Microsoft.Automation
Select the row, then select the Register Button at the top of the list
Create Entra ID App Registration
Inside the tenant where we are pulling the data from
In Entra ID Portal, create App Registration
Note the Tenant ID, Client ID
Create a Client Secret
Assign
Mail.ReadandUser.ReadinAPI PermissionsGrant Admin Consent
Set
https://login.microsoftonline.com/common/oauth2/nativeclientas the Redirect URI
Create Automation Account
Create an Automation Account
Once created, go to Modules under Shared Resources confirm that
ExchangeOnlineManagementandSQLServerhas been addedGo to Certificates under Shared Resources and Import the PFX file
Create a Runbook , using PowerShell for the language and version 5.1, and use the following script block;
Setup SQL Table
Run the following query in the Database to create an SQL Table:
How are failures communicated?
TBA
What to do if we notice a failure
TBA
Last updated