• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
The Blog of Jorge de la Cruz

The Blog of Jorge de la Cruz

Everything about VMware, Veeam, InfluxData, Grafana, Zimbra, etc.

  • Home
  • VMWARE
  • VEEAM
    • Veeam Content Recap 2021
    • Veeam v11a
      • Veeam Backup and Replication v11a
    • Veeam Backup for AWS
      • Veeam Backup for AWS v4
    • Veeam Backup for Azure
      • Veeam Backup for Azure v3
    • VeeamON 2021
      • Veeam Announces Support for Red Hat Enterprise Virtualization (RHEV/KVM)
      • Veeam announces enhancements for new versions of Veeam Backup for AWS v4/Azure v3/GVP v2
      • VBO v6 – Self-Service Portal and Native Integration with Azure Archive and AWS S3 Glacier
  • Grafana
    • Part I (Installing InfluxDB, Telegraf and Grafana on Ubuntu 20.04 LTS)
    • Part VIII (Monitoring Veeam using Veeam Enterprise Manager)
    • Part XII (Native Telegraf Plugin for vSphere)
    • Part XIII – Veeam Backup for Microsoft Office 365 v4
    • Part XIV – Veeam Availability Console
    • Part XV – IPMI Monitoring of our ESXi Hosts
    • Part XVI – Performance and Advanced Security of Veeam Backup for Microsoft Office 365
    • Part XVII – Showing Dashboards on Two Monitors Using Raspberry Pi 4
    • Part XIX (Monitoring Veeam with Enterprise Manager) Shell Script
    • Part XXII (Monitoring Cloudflare, include beautiful Maps)
    • Part XXIII (Monitoring WordPress with Jetpack RESTful API)
    • Part XXIV (Monitoring Veeam Backup for Microsoft Azure)
    • Part XXV (Monitoring Power Consumption)
    • Part XXVI (Monitoring Veeam Backup for Nutanix)
    • Part XXVII (Monitoring ReFS and XFS (block-cloning and reflink)
    • Part XXVIII (Monitoring HPE StoreOnce)
    • Part XXIX (Monitoring Pi-hole)
    • Part XXXI (Monitoring Unifi Protect)
    • Part XXXII (Monitoring Veeam ONE – experimental)
    • Part XXXIII (Monitoring NetApp ONTAP)
    • Part XXXIV (Monitoring Runecast)
  • Nutanix
  • ZIMBRA
  • PRTG
  • LINUX
  • MICROSOFT

Veeam: Veeam Backup for Azure – Job History Report

16th July 2025 - Written in: veeam

Greetings friends, over the years, I’ve been creating all sorts of scripts, dashboards, or small applications to solve customer problems or community requests.

Recently, I came across a very practical challenge. When managing thousands of workloads across Microsoft Azure, administrators often need to audit or submit compliance reports on specific protection jobs. But going through the VB Azure Appliance manually? Not scalable. Especially when you’re asked for historical backup sessions across random periods.

That’s when the power of the Veeam Backup for Azure REST API shines:

  • https://helpcenter.veeam.com/docs/vbazure/guide/overview.html?ver=8
  • https://www.veeam.com/veeam_backup_azure_8_rest_api_reference_map_ot.pdf

Why this is great for Administrators

Managing protection across thousands of Azure workloads can easily become a time sink — especially when backup admins are asked to validate jobs based on specific policies, types, or custom date ranges. There’s no built-in UI report that offers that level of flexibility (not even in Veeam ONE as of yet)

That’s where this script helps.

With just a few lines of PowerShell, you can:

  • Instantly query Veeam Backup for Azure’s REST API
  • Filter sessions by job type (e.g., PolicyBackup, PolicySnapshot, etc.) and custom date range
  • Generate structured, easy-to-read HTML reports
  • Automatically send results via Microsoft Graph API email
  • Confidently respond to compliance, audit, or license validation requests

All API-driven, automated, and 100% under your control.

Custom script in PowerShell

PowerShell remains one of the best tools when working with IT admins. It can handle API requests, process JSON, and generate HTML or CSV reports effortlessly. While combining everything into a polished HTML report can be tricky, this script does it for you.

  • Download the script here: https://github.com/jorgedlcruz/veeam-html-reporting/tree/main/veeam-backup-for-azure/job-history

After running the script, you’ll get a report like this:

And email delivery works flawlessly too:

Key Components

1.- Disable SSL verification

The script disables SSL validation, common practice with VB Azure appliances using self-signed certificates. For production, secure it properly using Let’s Encrypt certificates.

# Ignore SSL certificate validation errors (Not recommended for production)
Add-Type @"
    using System.Net;
    using System.Security.Cryptography.X509Certificates;
    public class TrustAllCertsPolicy : ICertificatePolicy {
        public bool CheckValidationResult(
            ServicePoint srvPoint, X509Certificate certificate,
            WebRequest request, int certificateProblem) {
            return true;
        }
    }
"@
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy

2.- Script Variables

At the top of the script, define:

  • Veeam Azure server URL
  • Credentials
  • Reporting Date Range
  • Session Types filter (comma-separated)
  • Microsoft Graph Email credentials (Tenant, AppId, Secret)
# PARAMETERS
$VeeamServer = "https://YOURVEEAMSERVER"
$VeeamUsername = "YOURVBAZUREUSER"
$VeeamPassword = 'YOURVBAZUREPASS'
$ApiVersion = "v8"
$RecipientEmail = "[email protected]"
$TenantId = "YOUR365ORG.onmicrosoft.com"
$ClientId = "YOURCLIENTID"
$ClientSecret = ConvertTo-SecureString "YOURSECRET" -AsPlainText -Force
$ReportDateFrom = (Get-Date).AddDays(-100).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
$ReportDateTo = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
$DateTimeFormat = "dd/MM/yyyy HH:mm" # Date/Time Format (e.g., "dd/MM/yyyy HH:mm" or "MM/dd/yyyy hh:mm tt")
$SessionTypes = "PolicyBackup,PolicySnapshot,PolicyArchive" # Session types (comma-separated, e.g., "PolicyBackup,PolicySnapshot,PolicyArchive")

3.- HTML Report and Email Delivery

The script builds a fully responsive HTML table and sends it as an attachment via Microsoft Graph API, saving you hours of manual reporting.

Conclusion

Solving real-world requests via API-driven automation is always satisfying. Hopefully, this script makes your reporting and auditing tasks simpler until native features arrive in future versions of Veeam ONE or Veeam Backup for Azure.

Give it a try and let me know your thoughts.

Filed Under: veeam Tagged With: veeam audit, veeam cloud report, veeam cloud reporting, veeam reporting

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

  • E-mail
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • YouTube

Posts Calendar

July 2025
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  
« Jun    

Disclaimer

All opinions expressed on this site are my own and do not represent the opinions of any company I have worked with, am working with, or will be working with.

Copyright © 2025 · The Blog of Jorge de la Cruz