Query Details

DevOps - Azure DevOps Inventory

Azure Dev Ops Repositories

Query

ExposureGraphNodes 
| where NodeLabel == @"azuredevopsrepository"
| extend Subscription = parse_json(EntityIds)[0]["id"]
| extend URL = parse_json(EntityIds)[1]["id"]
| parse Subscription with 
    "/subscriptions/" subscription_id 
    "/resourcegroups/" resource_group 
    "/providers/microsoft.security/securityconnectors/" * 
    "/devops/default/azuredevopsorgs/" azure_devops_org 
       "/projects/" project_name "/repos/" repo_name
| project NodeName, Subscription, URL,subscription_id, resource_group, azure_devops_org, project_name, repo_name

About this query

DevOps - Azure DevOps Inventory

Query Information

Description

Use the below query to identify Azure DevOps projects and repositories.

References

Microsoft 365 Defender

Explanation

This KQL (Kusto Query Language) query is designed to identify and extract information about Azure DevOps projects and repositories from a dataset called ExposureGraphNodes. Here's a simple breakdown of what the query does:

  1. Filter Nodes: It starts by filtering the data to only include nodes labeled as "azuredevopsrepository".

  2. Extract Information: The query then extracts specific details from a JSON field called EntityIds. It pulls out the subscription ID and URL from this JSON data.

  3. Parse Subscription Details: It further parses the Subscription field to break down the subscription path into more granular components:

    • subscription_id: The unique identifier for the Azure subscription.
    • resource_group: The resource group within the subscription.
    • azure_devops_org: The Azure DevOps organization.
    • project_name: The name of the project within the organization.
    • repo_name: The name of the repository within the project.
  4. Select and Display: Finally, it selects and displays a set of columns: NodeName, Subscription, URL, subscription_id, resource_group, azure_devops_org, project_name, and repo_name.

In summary, this query is used to list Azure DevOps projects and repositories, along with their associated details like subscription ID, resource group, organization, project name, and repository name.

Details

Alex Verboon profile picture

Alex Verboon

Released: April 16, 2026

Tables

ExposureGraphNodes

Keywords

AzureDevOpsProjectsRepositoriesSubscriptionsURLResourceGroupsSecurityConnectorsOrganizations

Operators

|whereextendparse_jsonparseproject

Actions

GitHub