Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Discovery for Microsoft Azure

If your cloud resources are in an Azure cloud, you must create a user identity called a service principal that grants permissions to the MID Server to access selected resources.

Azure management groups and subscriptions

An Azure management group contains other management groups and subscriptions. The management groups in an Azure Cloud environment form a hierarchy, but don’t contain volumes or virtual machines. Subscriptions contain cloud resources, such as virtual machines. The subscriptions that belong to management groups are called sub-accounts.

The advantages of using management groups are:

Easy population of sub-accounts

After you configure the management group and supply the necessary credentials, you can test the account. If the test succeeds, Discovery returns a list of subscriptions in that management group. From this list, you can choose one or more subscription sub-accounts to include in the Discovery schedule using the management group. For more information on the hierarchy of management groups and subscriptions, see Organize your resources with Azure management groups

Discovery of sub-account resources using dynamically acquired credentials

When you run Discovery on your subscriptions, you do not need separate credentials for each sub-account. Discovery finds the credentials for the management group and maps them to all of the subscription sub-accounts. The Cloud Discovery process handles credentials automatically by acquiring a temporary credential for each sub-account via an Azure API. You can elect to use the default configuration or customize the MID Server to assume other roles for additional controls and security. In addition, Discovery can automatically refresh the list of sub-accounts and datacenters covered in a discovery schedule. For more information, see the KB article Retrieve newer accounts/sub-accounts automatically via Cloud Discovery.

A service principal for Azure cloud services is similar to a Microsoft Windows service account that enables Windows processes to communicate with each other within an Active Directory domain.

To create the Azure service principal in your ServiceNow instance, copy the service principal credential values from the Azure portal into a text editor, and then transfer those values into the instance.

Image omitted: azure-text-file.png
Text file that temporarily holds Azure service principal credential values

This table shows you the Azure Service Principal value and the location in Azure where you can find the values you need for the credentials.

Cloud Provisioning and Governance settingAzure Service Principal valueLocation of the Azure value
Tenant IDAzure Directory ID value from the text file.Azure Active Directory > Properties > Directory ID
Client IDAzure Application ID value from the text file.Azure Active Directory > App registrations > Registered App.Application ID
Secret KeyAzure Application key value from the text file.Azure Active Directory > App registrations > Registered App > Settings > Keys (hidden)
Account IDAzure Subscription ID associated with the Tenant ID.Azure Active Directory > Subscriptions > Subscription ID

Verify the REST API Permissions

Download the Cloud Discovery patterns spreadsheet so you can grant user permissions required for running the Discovery patterns. In addition to permissions, the spreadsheet also includes useful information such as pattern names, types, CI Classes, and links to vendor documentation. New patterns are available quarterly, so check periodically to be sure you have the latest version of the spreadsheet.

Data collected by Service Mapping during top-down discovery

To include discovered components into service instances, enable CI relationships used in tag-based discovery by Service Mapping. These CI relationships are available from the 1.0.68 release on the ServiceNow Store. For operational steps, see Tag-based discovery configuration.

Service Mapping uses tag-based discovery to create service instance maps including the Cloud components. The Service Mapping application comes with the following preconfigured CI relationships used for tag-based discovery. These CI relationships are available from the 1.0.68 release on the ServiceNow Store.

CIRelationshipCI
Configuration Item [cmdb_ci]Hosted on::HostsLogical Datacenter [cmdb_ci_logical_datacenter]
Logical Datacenter [cmdb_ci_logical_datacenter]Hosted on::HostsCloud Service Account [cmdb_ci_cloud_service_account]

Azure Cloud Discovery API list

CI AttributesAzure Attributes
object\_idresponse.name
nameresponse.name
regionresponse.displayName
statusInstalled
CI AttributesAzure Attributes
object\_idresponse.id
nameresponse.name
statusInstalled/ Retired
state 
CI AttributesAzure Attributes
object\_idid
namename
stateavailable
statusInstalled/ Retired
CI AttributesAzure Attributes
object\_idid
state 
namename
cidrproperties.addressSpace.addressPrefixes
CI AttributesAzure Attributes
subnetNameresponse.name
subnetIdresponse.id
resourceGroupresponse.properties.resourceGuid
networkIdresponse.id.split\('/subnets/'\)
networkNamegetNetwork\(networkId\)
cidrBlockresponse.properties.addressSpace.addressPrefixes
CI AttributesAzure Attributes
stateproperties.provisioningState
storage\_typeproperties.BlobType
volume\_idid
namename
size\_bytesproperties.diskSizeGB \* 1024 \* 1024 \* 1024
object\_idid
sizeresponse.properties.diskSizeGB
"volume\_container"containerName
statusInstalled/ Retired
CI AttributesAzure Attributes
object\_idid
namename
stateproperties.provisioningState
CI AttributesAzure Attributes
memoryproperties.hardwareProfile.vmSize
stateThe instance statuses:- succeeded: on - running: succeeded/stopping - deallocating: stopping/stopped - deallocated: off - terminated: error
object\_idid
cpusproperties.hardwareProfile.vmSize
disksproperties.storageProfile.dataDisks
nicsproperties.networkProfile.networkInterfaces\[\].size
vm\_inst\_idproperties.vmId
namename
statusInstalled/ Retired
CI AttributesAzure Attributes
namename
object\_idname
vcpusnumberOfCores
memory\_mbmemoryInMB
local\_storage\_gbresourceDiskSizeInMB
coresnumberOfCores
CI AttributesAzure Attributes
object\_idresponse.id
nameresponse.name
public\_dnsproperties.dnsSettings.fqdn
public\_ip\_addressproperties.ipAddress
CI AttributesAzure Attributes
object\_id"properties.frontendIPConfigurations.properties.privateIPAddress OR properties.frontendIPConfigurations.properties.publicIPAddress, then call Public IP Address API"
name"properties.frontendIPConfigurations.properties.privateIPAddress OR properties.frontendIPConfigurations.properties.publicIPAddress, then call Public IP Address API"
ipaddress\_type"properties.frontendIPConfigurations.properties.privateIPAddress ==> Private IP Address OR properties.frontendIPConfigurations.properties.publicIPAddress ==> Public IP Address"
statusInstalled
CI AttributesAzure Attributes
object\_idid
namename
private\_ipproperties.ipConfigurations
public\_dnscall public ip address api - properties.dnsSettings.fqdn
stateproperties.provisioningState
is\_staticproperties.ipConfigurations
mac\_addressproperties.macAddress
public\_ipcall public ip address api -
CI AttributesAzure Attributes
nameresponse.id
object\_idresponse.name
guest\_osproperties.storageProfile.osDisk.osType
image\_sourceid
statusInstalled/ Retired
CI AttributesAzure Attributes
namename
object\_idid
sku\_namesku.name
stateproperties.provisioningState
CI AttributesAzure Attributes
object\_idresponse.id
nameresponse.name
state 
dns\_nameproperties.
fqdn 
canonical\_hosted\_zone\_name 

Useful information