PUBLIC BETA OFFER

Save 50% off on an Eligible Learning PlanValid for 1-month plan, 3-month plan, 12-month plan · Code LPXBETA50 · Ends Dec 6, 2026

AZ-401: Defender for Cloud DevOps Connections and Code to Cloud Context

Connect an authorized Azure DevOps scope to Defender for Cloud, verify identity and inventory, and distinguish scanner coverage from code-to-cloud remediation context.

Guide

Content version 1.0

AZ-401: Defender for Cloud DevOps Connections and Code to Cloud Context

AZ-401: Defender for Cloud DevOps Connections and Code to Cloud Context

Connect an authorized Azure DevOps scope to Microsoft Defender for Cloud, verify which resources and identity were actually connected, and then inspect the scanner coverage and cloud context behind each finding. A created connector is not proof that every repository was scanned or that a code finding is related to a deployed workload.

The worked procedure owns the Azure DevOps connector operation and its verification. It assumes the selected subscription, organizations and scanner arrangements already have owner approval. GitHub remains part of the platform and entitlement comparison, not a second onboarding exercise. No connection, consent, extension installation or scan was performed while writing this article.

Complete the access-management and repository-security prerequisites first. Record the Azure tenant, subscription, intended resource group, supported region and exact Azure DevOps organizations in scope. Identify the connector owner, the identity that will authorize it and the people responsible for repository findings.

Discovery can be broader than one repository. The documented Azure DevOps route offers all existing accessible organizations or all existing and future accessible organizations. It discovers projects and repositories within that scope. If the owner approved only a narrow repository subset that the offered operation cannot honor, stop before authorizing it.

Use the following preflight record:

Boundary What to establish
Azure creation authority Contributor on the subscription used to create the selected connector
Azure DevOps administration Project Collection Administrator permissions on every organization to be onboarded
Feature access Basic or Basic + Test Plans access on each such organization; Stakeholder is insufficient
Organization policy Third-party application access via OAuth is enabled by the authorized owner
Tenant and identity The intended tenant and account are selected in both Azure DevOps and Defender for Cloud
Discovery scope The actual accessible organizations and whether future discovery is authorized
Continuity A named owner can maintain the authorizing identity and handle reauthorization
Product conditions Supported platform/region and the separate plans and scanners needed for the desired capability

Access level and permission are different checks. Basic provides feature access; it does not by itself supply organization administration. Project administration is also not interchangeable with the required organization-level permission. Evaluate the chosen identity's effective access instead of assuming a familiar group name proves every prerequisite.

The specific onboarding route requires subscription Contributor. The broader support matrix describes additional role options for other capability contexts; do not replace this route's prerequisite with a reading role. Security Reader can be scoped to the resource group or connector for posture review, which is a different responsibility from creating and authorizing the connection.

Check the platform and feature envelope

Use a currently supported commercial-cloud region and platform combination from the support matrix. Azure DevOps Services support does not establish Azure DevOps Server support. The GitHub platform conditions are also specific: do not assume an enterprise deployment or data-residency arrangement is supported merely because another GitHub environment is.

Separate three questions before agreeing to costs or coverage:

  • Can this environment be connected and inventoried?
  • Which repository security products and scanners are enabled and producing evidence?
  • Which Defender for Cloud contextual capabilities require the paid plan and additional prerequisites?

Defender Cloud Security Posture Management (Defender CSPM) provides paid capabilities such as code-to-cloud contextualization, security explorer and attack-path analysis under their stated conditions. That entitlement is separate from GitHub Code Security or Secret Protection and their platform-specific availability.

Agentless code scanning is explicitly Preview in the support reference. Its default-branch coverage, supported inputs, repository limits, scanner selection and scan completion must be assessed separately. Do not present it as universal scanning automatically proved by connector creation.

This procedure does not repeat scanner setup. Use the actual approved configuration from the repository-security prerequisite and identify which source is expected to produce each finding type. A connector cannot substitute for an absent scanner or missing product entitlement.

Create the selected Azure DevOps connector

With the owner-approved identity and scope established, use the documented Azure portal route:

  1. Open Microsoft Defender for Cloud and select Environment settings.
  2. Select Add environment, then Azure DevOps.
  3. Enter the intended name, subscription, resource group and supported region. Confirm these values against the preflight record.
  4. Select Next: Configure access, then Authorize.
  5. Confirm the correct Azure tenant in the Azure DevOps selector and in Defender for Cloud. Read the requested permissions in the consent dialog.
  6. Accept only when that identity, permission request and discoverable organization scope match the approved operation.
  7. For Organizations, choose the documented existing-organizations option, or the existing-and-future option only if the wider future scope is explicitly authorized.
  8. Select Next: Review and generate, review the complete configuration and select Create.

These are proposed reader actions, not observations of a live connection. If a required permission, policy or consent is missing, return that precise prerequisite to its owner. Do not expand access across additional organizations just to make discovery succeed.

Before creating another connector, check whether the organization is already onboarded in that tenant. The onboarding reference limits an Azure DevOps organization to one onboarded instance in the tenant for proper advanced-posture functionality. Resolve an existing connection with its owner rather than creating a competing instance.

Record the actual connector identity, location, authorizing account, chosen discovery option and time of creation. Keep this operational record with the approved scope; do not place credentials or consent tokens in a shared troubleshooting document.

Verify discovery and identity separately

After creation, inspect the connector in Environment settings, then inspect Inventory and the DevOps security pages. Compare the actual organizations, projects and repositories with the approved set. An expected organization missing from the list and an unexpected organization appearing are different problems.

The reference allows up to eight hours for resources to appear after onboarding. Record elapsed time and the actual state instead of immediately broadening permissions or creating a duplicate connector. Findings have recommendation-specific refresh behavior, and scanning recommendations may require additional pipeline configuration.

The authorizing identity matters after consent. Defender for Cloud uses that account's access for repository reads, metadata queries and other supported operations; associated activity can appear under that identity. Its service calls also consume Azure DevOps usage capacity. Review the actual audit and usage evidence with the owner when diagnosing access or throttling.

If that account is removed or loses access, the documented operations stop until the connection is reauthorized. Prefer the owner's approved continuity arrangement, such as a dedicated account with the required access, over an unmanaged personal dependency. Do not test continuity by removing a shared production account's access.

The onboarding reference also describes automatic sharing and installation of the Microsoft Defender for DevOps Container Mapping extension in connected organizations. Verify its actual presence and metadata purpose with the organization owner. Do not confuse this mapping extension with every scanner or assume installation demonstrates a completed security analysis.

Establish coverage before interpreting findings

Use the DevOps inventory and resource health information to inspect enabled coverage. The overview distinguishes advanced-security states such as On, Off, Partially enabled and N/A. An unknown-information state is not evidence that the resource is protected or clean.

Observation What it can establish What remains unproved
Connector exists A configuration object was created Correct discovery, scanner execution or useful findings
Expected repository appears That resource is represented in inventory Every branch, language or finding type was scanned
Security feature is enabled A particular coverage configuration is on The relevant scan completed against the current revision
No finding is displayed No finding is visible in that view at that time Absence of vulnerabilities or complete collection
A finding has cloud context A supported relationship is available to inspect Automatic remediation or permission to deploy a fix
A recommendation is resolved The product reports that state The exact change and verification history without further inspection

For a visible finding, identify its repository, finding type, source scanner, relevant revision or artifact, observed time and current state where that evidence is available. Check freshness and coverage before comparing counts between two views. Do not manufacture a secret exposure or vulnerable commit to make a dashboard nonempty.

Azure Repos security is for supported Git repositories in Azure DevOps Services. Code Security and Secret Protection provide different capabilities and require their own enabled coverage. Similarly, GitHub's product availability depends on account plan and repository visibility; free public-repository features do not imply every private or internal repository has paid coverage.

Keep the platform and cloud plans distinct in the record. For example, a repository scanner can provide a finding while an advanced contextual view is unavailable because its Defender prerequisites are not satisfied. Conversely, an enabled cloud plan cannot make a missing repository scan result appear.

Inspect one supported code-to-cloud relationship

Choose an existing owner-approved finding rather than creating a new test exposure. Open the affected DevOps resource and inspect the supported context available for that finding. When a container relationship is provided, compare the actual pipeline/image metadata with the intended deployed resource instead of relying on a similar application name.

Record what the product actually links: the code or configuration evidence, the artifact or image identity where available, the cloud resource and the associated risk context. Missing metadata is a limitation to investigate, not a reason to fill in a plausible relationship manually.

As a reasoning example, an image name alone may be reused across releases. A finding associated with one build is not automatically evidence about every workload using that name. Use the actual available identity and deployment evidence to decide whether the relationship applies. This example describes a validation question, not a finding observed in a real tenant.

Defender for Cloud's context can help prioritize remediation, but it does not establish exploitation, prove causation or grant repository write access. The code owner should review the source-side issue, while the workload owner confirms the deployment context and operational impact.

If the required mapping or paid capability is unavailable, report that specific gap. The onboarding and inventory portions can be verified independently; do not claim the full correlation outcome completed without the necessary evidence.

Assign remediation without confusing ownership

Make the handoff concrete enough for another owner to act:

  • Identify the actual resource and finding, with its observed state and time.
  • State which scanner and coverage configuration produced the evidence.
  • Explain the supported cloud relationship and any uncertainty.
  • Name the repository owner and the cloud workload owner who must assess the change.
  • Specify the normal review, testing and rescan evidence required before closure.

A portal annotation or an assistant-generated proposal is not a merged fix. Use the repository's established change process and verify the scanner's subsequent result after an authorized correction. A dismissed or unavailable alert should not be described as remediated without explaining the state and reason.

For an existing GitHub connection, the same ownership questions apply, but its onboarding permissions and supported capabilities are not identical to the Azure DevOps route. This article does not authorize a second GitHub connection or provide a substitute GitHub installation procedure.

Validate failures and restore the owned scope

Before calling onboarding complete, inspect expected and unexpected cases with the owner:

Case Required response
Missing Basic access or organization administration Stop authorization; confirm both prerequisites separately
Tenant or consent mismatch Stop before acceptance and correct the intended context
Discovery option exceeds the approved scope Do not create the connection with that scope
Inventory still absent during the stated ingestion period Record elapsed time and connection state; do not infer a clean scan
Inventory exists but scan evidence is missing Inspect the scanner, entitlement and recommendation prerequisites
Finding exists but its cloud relationship is uncertain Preserve the evidence and report the unresolved mapping
Authorizing identity loses required access Coordinate documented reauthorization with the connector owner
An unintended organization is connected Stop further expansion and have the owner review and correct the connected scope

Do not deliberately revoke a shared account, weaken policy or connect an unauthorized organization to demonstrate a negative case. These checks define expected handling; any unperformed check must remain marked as such.

The onboarding documentation allows organizations to be added or removed later through Environment settings. For an owned exercise, have the connector owner restore only the approved temporary scope and verify the actual inventory and authorization state afterward. Coordinate with scanner and workload owners before changing shared access or retention.

Preserve the original scope record, consent decision, actual connected resources, coverage limitations, finding context and ownership handoff. This makes the result reviewable even when no finding or mapping was available. A completed connector task is one part of the evidence chain, not a blanket code-to-cloud security verdict.

Authoritative Sources

0 views