Question 84 of 975

Quick Answer

The answer is that the Get-AzureADIdentityRiskyUser cmdlet does not support the -Filter parameter, which is why the script fails to disable high-risk users. This is a critical technical limitation: when you use -Filter "riskLevel eq high" with this cmdlet, it returns no results or throws an error because the cmdlet only supports filtering by user ID or by all risky users, not by risk level. On the Microsoft 365 Administrator MS-102 exam, this tests your understanding of Azure AD Identity Protection cmdlet syntax and common pitfalls when automating risk remediation. A frequent trap is assuming all Get-* cmdlets in the AzureAD module accept the -Filter parameter, but Get-AzureADIdentityRiskyUser is a notable exception—you must instead use Get-AzureADIdentityRiskyUser -All $true and then filter the results in memory with Where-Object. Remember the memory tip: "Risky users don't filter—they need a Where-Object lifter."

MS-102 Practice Question: Implement and manage Microsoft Entra identity and access

This MS-102 practice question tests your understanding of implement and manage microsoft entra identity and access. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. 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.

Exhibit

Refer to the exhibit.

$users = Get-AzureADUser -All $true
foreach ($user in $users) {
    $risky = Get-AzureADIdentityRiskyUser -Filter "userPrincipalName eq '$($user.UserPrincipalName)'"
    if ($risky.riskLevel -eq 'high') {
        Set-AzureADUser -ObjectId $user.ObjectId -AccountEnabled $false
    }
}

Refer to the exhibit. You run this PowerShell script to disable high-risk users. However, some high-risk users remain enabled. What is the most likely reason?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "most likely"

    Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

Question 1hardmultiple choice
Full question →

Exhibit

Refer to the exhibit.

$users = Get-AzureADUser -All $true
foreach ($user in $users) {
    $risky = Get-AzureADIdentityRiskyUser -Filter "userPrincipalName eq '$($user.UserPrincipalName)'"
    if ($risky.riskLevel -eq 'high') {
        Set-AzureADUser -ObjectId $user.ObjectId -AccountEnabled $false
    }
}

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

The Get-AzureADIdentityRiskyUser cmdlet does not support the -Filter parameter

The Get-AzureADIdentityRiskyUser cmdlet does not support the -Filter parameter. This means the script's attempt to filter for high-risk users using -Filter "riskLevel eq high" will fail, returning no users or an error, so the subsequent Set-AzureADUser cmdlet never runs against the intended high-risk users, leaving them enabled.

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.

  • The Set-AzureADUser cmdlet fails for disabled users

    Why it's wrong here

    The script disables users, not re-enables.

  • The script does not have permission to read risky users

    Why it's wrong here

    Permission issues would cause an error, but the script runs without error.

  • High-risk users are protected by a Conditional Access policy

    Why it's wrong here

    Conditional Access does not prevent disabling via PowerShell.

  • The Get-AzureADIdentityRiskyUser cmdlet does not support the -Filter parameter

    Why this is correct

    The correct syntax is `Get-AzureADIdentityRiskyUser -Filter "riskLevel eq 'high'"` but the script filters by userPrincipalName first, then checks riskLevel, which might not work as expected because the filter might be invalid.

    Clue confirmation

    The clue word "most likely" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Microsoft often tests the misconception that all Get-* cmdlets in Azure AD support the -Filter parameter, when in reality some cmdlets like Get-AzureADIdentityRiskyUser have limited or no filter support, leading candidates to overlook the need for client-side filtering.

Detailed technical explanation

How to think about this question

The Get-AzureADIdentityRiskyUser cmdlet belongs to the AzureADPreview module and only supports filtering via the -Filter parameter for specific properties like riskState or riskLevel, but not for riskLevel alone in all versions; the correct approach is to use Get-AzureADIdentityRiskyUser -All $true and then filter with Where-Object. In practice, this cmdlet returns all risky users by default, and the unsupported filter silently returns an empty collection, causing the disable action to be skipped.

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 MS-102 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 MS-102 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 MS-102 question test?

Implement and manage Microsoft Entra identity and access — This question tests Implement and manage Microsoft Entra identity and access — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: The Get-AzureADIdentityRiskyUser cmdlet does not support the -Filter parameter — The Get-AzureADIdentityRiskyUser cmdlet does not support the -Filter parameter. This means the script's attempt to filter for high-risk users using -Filter "riskLevel eq high" will fail, returning no users or an error, so the subsequent Set-AzureADUser cmdlet never runs against the intended high-risk users, leaving them enabled.

What should I do if I get this MS-102 question wrong?

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

Are there clue words in this question I should notice?

Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

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

Last reviewed: Jun 30, 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 MS-102 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 MS-102 exam.