⚡Pull live — the same three queries, run for you
Signs you in with Microsoft and runs the same three queries the export route hands you: the Defender hunting query, the Resource Graph query for public IPs, and the named-locations call. Delegated and read-only: it sees what you can see. Still nothing sent to the estate — every call goes to Microsoft.
1Defender device export
Defender portal → Hunting → Advanced hunting → paste the query → Run → Export. A role that can run hunting queries is enough — no app registration, no consent. This is the only route that carries a public IP; the Devices blade export does not.
IsInternetFacing: a filtered
device list turns “not in this file” into a coverage gap that does not exist, and the
report flags it when every row is internet-facing.2Azure public IP addresses
Azure portal → Public IP addresses → Export to CSV, which is the file this was built against. Or run the script: Resource Graph covers every subscription in one call instead of one blade per tenant.
Install-Module Az.ResourceGraph and
Connect-AzAccount. Reader on the subscriptions is enough — no app
registration.3Entra trusted locations — optional
Entra admin centre → Protection → Conditional Access → Named locations, or run the script. A trusted location is your organisation declaring this public range is ours — an ownership claim neither of the files above can make, because one lists devices Defender manages and the other lists addresses Azure issued.
Install-Module Microsoft.Graph.Authentication — that
submodule alone, not the whole SDK. Policy.Read.All is the least-privileged
scope and Global Reader or Security Reader already carries it, so no app registration.
The raw Graph JSON works here too, if you would rather use Graph Explorer than install
anything.4Tenant & previous baseline — optional
A baseline is a small file this report writes at the end. Load last month's and this run gains a delta: what appeared, what lost its sensor, what Shodan started seeing. Without one the report is simply today, which is what it has always been.