Question 167 of 1,000
Manage identity and accesshardMultiple ChoiceObjective-mapped

Quick Answer

The answer is to use the Azure REST API with a managed identity assigned to the DevOps agent to request JIT access, specifying the agent's current source IP address. This is correct because it solves the core challenge of dynamic IPs in a CI/CD pipeline: the managed identity provides secure, secretless authentication to Azure Resource Manager, while the REST API call dynamically submits the agent’s ephemeral source IP to the JIT policy endpoint, granting time-bound RDP access for each deployment. On the AZ-500 exam, this scenario tests your understanding of combining managed identities with Defender for Cloud’s JIT VM access automation, often appearing as a trap where candidates mistakenly choose static IP whitelisting or service principal secrets. The key insight is that JIT requires the exact source IP at request time, so a pre-configured rule won’t work for dynamic agents. Memory tip: think “Managed Identity + REST API = Dynamic JIT” — the identity handles auth, the API handles the changing IP.

AZ-500 Manage identity and access Practice Question

This AZ-500 practice question tests your understanding of manage identity and access. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A company uses Microsoft Defender for Cloud's Just-In-Time (JIT) VM access to manage RDP connections to a critical jump-box virtual machine. The company has a CI/CD pipeline running on Azure DevOps agent pools that needs to periodically RDP into this VM to deploy software. The agent pool's source IP addresses are dynamic and change frequently. They want the pipeline to automatically request JIT access before each deployment without manual intervention. Which approach should they implement?

Question 1hardmultiple choice
Full question →

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Use the Azure REST API with a managed identity assigned to the DevOps agent to request JIT access, specifying the agent's current source IP address

Option A is correct because it uses the Azure REST API with a managed identity to dynamically request JIT VM access, specifying the agent's current source IP address. This approach allows the CI/CD pipeline to authenticate without secrets and automatically obtain time-bound RDP access, even though the agent's IP changes frequently. The managed identity provides secure, automated authentication to Azure Resource Manager, enabling the pipeline to call the JIT policy endpoint and grant access for the deployment duration.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use the Azure REST API with a managed identity assigned to the DevOps agent to request JIT access, specifying the agent's current source IP address

    Why this is correct

    The REST API endpoint for JIT allows programmatic requests. A managed identity on the agent (or virtual machine running the agent) provides secure authentication without secrets. The pipeline can fetch its current outbound IP and request JIT access for the required time.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Create a JIT access rule in Defender for Cloud with a scheduled time window that matches the pipeline's deployment schedule

    Why it's wrong here

    Scheduling a JIT rule to open the port during expected times undermines the zero-trust principle of JIT. It leaves the port open for the entire window, even if no deployment occurs, increasing the attack surface.

  • Configure a PowerShell script in the pipeline to modify the network security group (NSG) to allow the agent's IP during deployment

    Why it's wrong here

    Directly modifying NSGs bypasses JIT's centralized approval and auditing. It is less secure and harder to manage. The JIT REST API is the intended way to automate access while maintaining security controls.

  • Assign a static public IP to the Azure DevOps agent and add that IP to the JIT allowed list permanently

    Why it's wrong here

    This would effectively disable JIT for that IP by making it always allowed, which violates the principle of just-in-time access.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates may think scheduled JIT rules (Option B) exist or that permanently whitelisting an IP (Option D) is acceptable, but Azure JIT is designed for dynamic, on-demand access requests, not static schedules or permanent allowances.

Detailed technical explanation

How to think about this question

The Azure REST API endpoint for JIT access is `https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{policyName}/initiate?api-version=2020-01-01`. The request body includes the virtual machine ID, the port (e.g., 3389 for RDP), and the requesting IP address. A managed identity assigned to the Azure DevOps agent pool (e.g., a user-assigned managed identity) can be used with Azure CLI or PowerShell to call this API, ensuring the pipeline authenticates securely without storing credentials.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A company's IT admin needs to give a contractor read-only access to production logs without sharing account credentials. Using role-based access control (RBAC) and temporary scoped permissions — not a permanent shared password — is the correct pattern. Questions like this test whether you can apply least-privilege access across cloud identity services.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related AZ-500 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free AZ-500 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this AZ-500 question test?

Manage identity and access — This question tests Manage identity and access — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Use the Azure REST API with a managed identity assigned to the DevOps agent to request JIT access, specifying the agent's current source IP address — Option A is correct because it uses the Azure REST API with a managed identity to dynamically request JIT VM access, specifying the agent's current source IP address. This approach allows the CI/CD pipeline to authenticate without secrets and automatically obtain time-bound RDP access, even though the agent's IP changes frequently. The managed identity provides secure, automated authentication to Azure Resource Manager, enabling the pipeline to call the JIT policy endpoint and grant access for the deployment duration.

What should I do if I get this AZ-500 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Keep practising

More AZ-500 practice questions

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This AZ-500 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-500 exam.