In this post we will be going through the process of setting up Azure Backup Email Reporting.
First step is to configure the Azure Backup Reporting, for this you will need to have already configured at least one Azure Recovery service vaults and have backup running.
I have gone through this process in a previous post so wont be going over here. see previous post for steps involved.
Once we have the backup vault and backup configured we need to configure an Log Analytics workspace to send diagnostic data to so the reports can generate data.
To create a Log Analytics Workspace go to the Azure Admin portal > Log Analytics workspaces.
Select the resource group the workspace will be created in, give it a name and select the region.
Add tags if required and create.
Now that we have the log workspace we can configure the backup vault to send diagnostic data.
Go to Backup center > Vault
Select the vault that will have diagnostic enabled and go to Diagnostic settings.
Give the diagnostics a name, select the Azure backup category’s and send to log workspace. Select the log workspace to send to.
Click save it can take a few hours before data starts to show in the workspace.
To check that the backup report are showing data,
Go to Backup center > Backup reports and select the workspace from the drop down list.
Click on summary tab to view the summary report.
Once we have reports working we can now configure the email reporting.
To configure email reporting,
Go to Backup center > Backup reports > Email Report
Give the task a name (this will be the name of the logic app), set the subscription, resource group and region.
We will also need to set email frequency, destination email address and email subject.
There is a bug in the naming of the task it suppose to allow hyphens but the UI gives an error if you use them. The work around to this is to create without the hyphens and then once the logic app is deployed clone with the correct naming.
Once the logic app is created if we want to use hyphens, go to Clone and use hyphens for the name of the cloned logic app.
Then remove the logic app without the hyphens.
Next we need to approve both the API’s
On the Office365 API authorize the account that is authorize will be used to send the mail so if there is no mailbox associated against the account you will receive an error like the below.
“Office 365 Outlook” connector Error:- REST API is not yet supported for this mailbox. This error can occur for sandbox (test) accounts or for accounts that are on a dedicated (on-premise) mail server
To use a Shared Mailbox the Logic app will need modified the send a mail v2 action and add in a from address and use an account that has send as permission set on the mailbox.
Once both API have been authorized we can run the trigger to test the job.
The backup report should then send.
To modify the time that the mail is sent at, we will need to set the time in the logic app. Open the logic app designer and add a new parameter under Recurrence.
Set the value to the start time required.
The summary mail should now send daily at 9AM.