Someone wants a picture of what the Azure environment actually looks like. Not how it should look, and not how it looked in last year's architecture diagram. You know good tools exist for this. You also know there are several of them, with different ways to install, different sign-ins and different reports. This is a guide to a script that does the boring part for you.
(An exception to the rule: this article is in English, because the tool, the report and its audience are.)
What is Azure Rapportkit?
Azure Rapportkit is a PowerShell script that I built and published as open source on GitHub (MIT licence). I picked three free tools that complement each other. The script fetches them, signs in, runs them and summarises the result in an HTML report. Some of the data does not come from those tools at all: the script fetches it directly from Azure with the Azure CLI.
| Tool | What it gives |
|---|---|
| Azure Governance Visualizer | Management groups, policies and role assignments |
| azqr | Recommendations per resource, Advisor and Defender |
| Maester (optional) | Tests of Entra ID: MFA, Conditional Access and privileged roles |
| Azure CLI (used by the script itself) | Sign-in and role check, plus Defender plans, Secure Score, cost for the last 12 months, management group structure and virtual networks with peerings, all read-only via Azure Resource Manager and Resource Graph |
I built it to get a quick overview of an Azure environment, and to be able to do periodic follow-up: the same run again next month. The idea is not remarkable. The tools already exist and they are good. What takes time is getting them together and getting out something a human being can stand to read. Rapportkit is the glue.
What it does, and what it does not
The script writes nothing to Azure resources or to the Entra configuration. Everything is reading. It is still worth knowing what it does do:
- It installs tools on the computer you run it from.
- It creates sign-in sessions, which show up in the tenant's logs.
- Maester requires an administrator to approve read permissions (admin consent), and that is a change in the tenant.
- The result is saved locally and contains confidential information.
The script is one file plus a few files in lib\, so it is easy to read before you run it. Please do.
What you need
The account that signs in needs four roles:
| Role | Scope | Used for |
|---|---|---|
| Reader | Tenant Root Group | Governance Visualizer and azqr |
| Security Reader | Tenant Root Group | Defender recommendations and Secure Score |
| Cost Management Reader | Tenant Root Group | Cost for the last 12 months |
| Global Reader | Microsoft Entra ID | Maester |
The roles are checked right after sign-in, before anything more is fetched. If a role is missing, the script shows which commands add it and asks if you want to continue anyway. The default answer is no.
The most common pitfall: Global Administrator in Entra ID does not give access to Azure resources. They are two different worlds. The README describes how a Global Administrator temporarily turns on "Access management for Azure resources" and assigns the roles at scope /. Also check that the roles sit on the Tenant Root Group, not on a subscription or a resource group.
Have the tenant ID at hand (Entra ID, Overview). The script asks for it, and then two sign-in windows open in the browser.
How to run it
Open an ordinary PowerShell window, not ISE, and run:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\Run-Rapportkit.ps1
Windows PowerShell 5.1 is enough as a starting point. The script installs PowerShell 7 and restarts itself there. If you would rather not download the zip by hand, the README has a one-liner that fetches the latest release and starts the script in a new window.
During the run the script shows a box per step (STEP 3 OF 10) with a progress bar and coloured statuses: OK, WARNING, MISSING, FAILED, and TODO when something is yours to do. There are ten steps: preparation, pre-flight checks, Azure CLI sign-in and role check, dependencies, sign-in to Az and Graph, the three tools, Defender, cost and structure, and finally the report.
A run takes from ten minutes up to a couple of hours in a large environment, so start it before lunch, not at ten to five.

A few things that are good to know:
- Dependencies are fetched in pinned, tested versions. Zip files are checked against SHA256 sums, and a changed file stops the run.
- If one tool fails, the others run anyway. The error shows up in the summary and in the status table at the top of the report.
- If you interrupt with Ctrl+C, just run it again. Nothing has been changed in Azure.
- The script signs out of the sessions it created itself when it is done. Sign-ins that existed before are left alone.
The report
The result ends up in one folder per month. The main page is rapport.html, and it ties together six more pages: Overview, Structure, Governance, Resources, Entra ID and Defender & cost, plus a page about the run. Every page is self-contained, with style and logo embedded, and fetches nothing from the internet. The report follows the reader's light/dark setting and has a button that saves the whole report as PDF.

The overview summarises the numbers and lists "what stands out": automatically produced observations meant as a starting point for the review, not as an assessment.
The other pages go deeper. Structure shows management groups, subscriptions, virtual networks and peerings. Governance shows role assignments and policies. Entra ID shows which tests failed and which could not be run. Defender & cost shows Secure Score, Defender plans and cost per month.

The tools' own reports (Governance Visualizer, Maester, azqr's Excel file) stay as further reading and cannot be restyled. Governance Visualizer's report also fetches its style and scripts from the internet, so it looks wrong offline.
The report can be produced in English or Swedish (-ReportLanguage sv). The script's own messages in the window are always in English.
Make it yours
The look is the files in the branding\ folder: theme.json, a logo, a background and a custom.css. There is no switch. Replace the files and you get a new look. The default is Moln på svenska, and there is a neutral example profile in branding-exempel\neutral to start from. You do not need to run the tools again either: .\Run-Rapportkit.ps1 -ReportOnly -Period 2026-10 rebuilds the report from an earlier run with the new branding.
When the result is going to someone else
The result contains real names of users, resources and subscriptions. That is why there are two routes, and the script asks which one you want at the start.
Encrypted package. The result is zipped and password-encrypted (AES-256) with a password you choose. Send the file and the password by different routes, for example the file by e-mail and the password by SMS. The recipient unpacks with Unprotect-Rapportkit.ps1, which also checks that the file arrived unchanged. The format is built on standard .NET functions but has not been reviewed by a third party, so pick a long password.
Anonymized report (-Anonymize). Only the anonymized report is kept. The tools run in a temporary folder, and when the run is done everything with real names is deleted. Users, groups, subscriptions and resources get aliases such as "User 3" and "Subscription 1" (the same name always gets the same alias), and all GUIDs, e-mail addresses and IP addresses are replaced, even ones that were not collected.
A limitation to take seriously: free text outside the collected columns, such as tag values and names shorter than four characters, is not replaced. Read the report through before you share it.
The screenshots in this article come from an anonymized run.
When it does not work
The most common obstacles, and what usually helps:
| What is wrong | Do this |
|---|---|
AuthorizationFailed or empty results | Check that the roles are activated (PIM) and assigned at the right scope |
| Governance Visualizer: the check fails although you are Global Administrator | Global Administrator does not give access to Azure resources. Elevate access temporarily and assign Reader, Security Reader and Cost Management Reader at / |
Sign-in stops with AADSTS53003 or similar | Conditional Access is blocking it. Ask IT to allow the apps "Microsoft Azure CLI", "Azure PowerShell" and "Microsoft Graph Command Line Tools", or run from a managed computer |
azqr.exe cannot be run | Antivirus, EDR or AppLocker is blocking the downloaded file. Ask IT for an exception |
Windows Defender: "Unauthorized changes blocked" for pwsh.exe | Controlled folder access (ransomware protection). Run with -OutputRoot C:\rapportkit or allow pwsh.exe |
The full troubleshooting table is in the README. Send rapportkit.log when you ask for help. The logs contain no passwords or tokens, but the tenant ID and names of accounts and resources may appear.
Try it yourself
The code and the latest release are on GitHub. If you find a bug, or something that should work differently: open an issue there.