giip
PartnersSES Proposal
6 min read

Network Topology (Net3D) Azure Resource Import Guide

This guide explains how to turn an Azure subscription's resource list and the connections between resources into JSON and overlay it as a separate layer on the Network Topology screen. As long as you follow the schema in this document, the JSON can be produced by any tool (including an AI) and imported as-is.

🚀 Go to the Network Topology page →

⚠️ Current premises — read first

  • Manual import only. The giip server does not store Azure credentials and does not run az on the server (multi-tenant isolation principle). The operator (or an AI acting for the operator) creates the JSON in their own environment and imports it on the screen.
  • Nothing is stored on the server. Imported data is kept only in the browser session (sessionStorage) and is never sent to the server. It disappears when the session ends and is replaced when you import again. There is currently no periodic/automatic refresh path.
  • No secret values. The JSON contains only resource metadata and connections (edges). Never include keys, connection strings, passwords or other secrets. The az commands in this procedure return no secret values by design.

📋 Overview

The Azure import layer is an overlay layer separate from the server/DB graph collected by agents (the main Net3D graph).

  • All nodes are drawn as spheres with a fixed color per Azure resource type (see the legend in the import panel).
  • The layer is an opt-in toggle (off by default). Turn it off and only the main graph is shown.
  • PaaS resources that cannot run an agent, such as App Service, can still appear in the layout through this layer. Note that it shows configuration relationships (which resource belongs where and what it connects to), not live traffic.

🚀 Quick Start

  1. On your own PC, run az login and select the target subscription.
  2. Create the import JSON using Method 1 (the export script) or Method 2 (author it directly to the schema) below.
  3. On the topology screen, open Import Azure Resources and upload the file or paste the JSON.
  4. Turn the layer toggle on and the Azure nodes and links are overlaid on the main graph.

Method 1: Generate with the export script

A helper script in the giipv3 repository assembles nodes and edges from az output. It requires az and jq.

az login
az account set --subscription <subscription name or ID>
./scripts/net3d-azure/export-azure-topology.sh > azure-topology.json
# Or pass the subscription as an argument: ./scripts/net3d-azure/export-azure-topology.sh "giip" > azure-topology.json

What the script collects:

Materialaz commandProduces
Resource listaz resource listAll nodes (id·name·type·location·resourceGroup·kind)
Site → planserverFarmId from az webapp list, az functionapp listhostedOn edges
SQL DB → SQL serverResource ID hierarchy (the part before /databases/)childOf edges
Subnet → VNetResource ID hierarchy (the part before /subnets/)childOf edges
Private Endpoint → targetprivateLinkServiceId from az network private-endpoint listprivateEndpoint edges

properties.serverFarmId from az resource list can come back empty, so site→plan edges must be taken from az webapp list / az functionapp list (the script does this).

Method 2: Author directly to the schema

Top-level structure

{
  "schemaVersion": "1.0",                 // Optional. Currently "1.0"
  "generatedAt": "2026-10-09T02:35:29Z",  // Optional. ISO8601 UTC
  "subscriptionName": "example-sub",      // Optional. Display only
  "subscriptionId": "00000000-0000-0000-0000-000000000000", // Optional. Display only
  "nodes": [ /* AzureImportNode[] */ ],   // Required. Empty is an error
  "edges": [ /* AzureImportEdge[] */ ]    // Optional. May be absent or empty
}

nodes[] — required

FieldTypeRequiredDescription
idstring✅Azure resourceId (globally unique). The key that edges reference
namestring✅Resource name (display). If absent, id is used instead
typestring✅Resource type (e.g. Microsoft.Web/sites). Used for legend color classification
locationstring | null—Region (e.g. japaneast)
resourceGroupstring | null—Resource group name
kindstring | null—kind (e.g. functionapp, StorageV2)
  • Nodes without id or type are excluded from mapping. If id is duplicated, only the first entry is kept.

edges[] — optional

FieldTypeRequiredDescription
sourcestring✅resourceId of the source node
targetstring✅resourceId of the target node
relationstring—Connection kind. Defaults to related

Standard relation values:

ValueMeaningSource
hostedOnSite (App Service/Function App) → App Service PlanserverFarmId
childOfSQL Database → SQL Server, Subnet → VNetresourceId hierarchy
privateEndpointPrivate Endpoint → target resourceprivateLinkServiceId
  • An edge is drawn only when both endpoint nodes exist in nodes[] (otherwise it is skipped).
  • resourceIds may mix upper and lower case (e.g. serverFarms vs serverfarms); matching is done after lower-case normalization.
  • Self-referencing edges and duplicate edges are excluded.

Complete minimal example

{
  "schemaVersion": "1.0",
  "generatedAt": "2026-11-24T00:00:00Z",
  "subscriptionName": "example-sub",
  "subscriptionId": "00000000-0000-0000-0000-000000000000",
  "nodes": [
    {
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Web/serverfarms/example-plan",
      "name": "example-plan",
      "type": "Microsoft.Web/serverfarms",
      "location": "japaneast",
      "resourceGroup": "example-rg",
      "kind": null
    },
    {
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Web/sites/example-app",
      "name": "example-app",
      "type": "Microsoft.Web/sites",
      "location": "japaneast",
      "resourceGroup": "example-rg",
      "kind": "app"
    },
    {
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Sql/servers/example-sql",
      "name": "example-sql",
      "type": "Microsoft.Sql/servers",
      "location": "japaneast",
      "resourceGroup": "example-rg",
      "kind": null
    },
    {
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Sql/servers/example-sql/databases/example-db",
      "name": "example-db",
      "type": "Microsoft.Sql/servers/databases",
      "location": "japaneast",
      "resourceGroup": "example-rg",
      "kind": null
    }
  ],
  "edges": [
    {
      "source": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Web/sites/example-app",
      "target": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Web/serverfarms/example-plan",
      "relation": "hostedOn"
    },
    {
      "source": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Sql/servers/example-sql/databases/example-db",
      "target": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Sql/servers/example-sql",
      "relation": "childOf"
    }
  ]
}

Procedure when building directly from az output

  1. Collect nodes: Use the output of az resource list --query "[].{id:id, name:name, type:type, location:location, resourceGroup:resourceGroup, kind:kind}" -o json as nodes as-is.
  2. hostedOn: From az webapp list --query "[].{id:id, serverFarmId:serverFarmId}" -o json and the same query on az functionapp list, create {source: id, target: serverFarmId, relation: "hostedOn"} for every item that has a serverFarmId.
  3. childOf: For nodes of type Microsoft.Sql/servers/databases, the part of the id before /databases/ is the SQL server id; for Microsoft.Network/virtualNetworks/subnets, the part before /subnets/ is the VNet id.
  4. privateEndpoint: From az network private-endpoint list --query "[].{id:id, targets:privateLinkServiceConnections[].privateLinkServiceId}" -o json, create {source: id, target: target, relation: "privateEndpoint"} for each target.
  5. Clean up: Remove edges whose endpoints are not in nodes, self edges and duplicates. Comparison uses lower-case normalization.
  6. Check for secrets: Confirm no keys or connection strings slipped into the output JSON. The queries above return no secret values by design.

Input validation and limits

The adapter validates input on import. The screen never breaks; only an error message is shown.

ItemLimitError key when exceeded
Raw text size5 MBnet3d.azure.error.tooLarge
Node count3000net3d.azure.error.tooManyNodes
Edge count6000net3d.azure.error.tooManyEdges

Other error keys: empty input (emptyInput), JSON parse failure (invalidJson), root is not an object (invalidRoot), nodes missing (missingNodes), empty array (emptyNodes), zero valid nodes (noValidNodes).

Importing on the screen

  1. Open /en/network-topology.
  2. Click Import Azure Resources and import by file upload or by pasting JSON. On success, a summary shows how many nodes/edges were imported.
  3. Turn the layer toggle on to display it. Check the legend for the per-type colors.
  4. To remove it, use the import clear (empty layer) action. The data does not survive the end of the session either.

Troubleshooting

SymptomCauseFix
tooManyNodes / tooManyEdges errorLimit exceededNarrow the subscription / resource group scope and regenerate
noValidNodes errorEvery node lacks id/typeFill in node fields per the schema
An edge is not drawnOne endpoint is not in nodesInclude the referenced resource in nodes. ID case is ignored
No site→plan edgesUsed serverFarmId from az resource listTake it from az webapp list / az functionapp list
Layer disappears after refreshStored in sessionStorage, gone when the session endsKeep the JSON file and import it again
Want periodic automatic refreshNo path under the current premise (manual import)Automate only the JSON generation; import on the screen

Version: 1.0 Last Updated: 2026-11-24 Source File: giipv3/public/help/api-network-topology-azure.en.md