The answer is to list all unlicensed users in the tenant. This is correct because the PowerShell command `Get-MgUser -Filter 'assignedLicenses/$count eq 0' -ConsistencyLevel eventual` uses the `assignedLicenses/$count` property to filter for users where the count of assigned licenses equals zero, effectively retrieving every user without any license. The `-ConsistencyLevel eventual` parameter is mandatory for such advanced OData filters on directory objects, ensuring the query returns accurate results across all users. On the MS-102 exam, this tests your ability to manage licensing with Microsoft Graph PowerShell, often appearing as a scenario where you must identify unlicensed users before assigning or auditing licenses. A common trap is forgetting the `-ConsistencyLevel eventual` flag, which causes the filter to fail. Remember the mnemonic “Zero Licenses, Eventual Consistency” to link the filter value `eq 0` with the required parameter.
MS-102 Deploy and manage a Microsoft 365 tenant Practice Question
This MS-102 practice question tests your understanding of deploy and manage a microsoft 365 tenant. 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.
```
Get-MsolUser -All | Where-Object {$_.isLicensed -eq $false} | Select-Object UserPrincipalName
```
Refer to the exhibit. You run this PowerShell command in your Microsoft 365 tenant. What is the purpose of the command?
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
To list all unlicensed users in the tenant
The PowerShell command `Get-MgUser -Filter 'assignedLicenses/$count eq 0' -ConsistencyLevel eventual` retrieves all users in the Microsoft 365 tenant who have no licenses assigned. The `assignedLicenses/$count eq 0` filter checks that the count of assigned licenses is zero, and `-ConsistencyLevel eventual` is required for advanced queries on directory objects. This directly corresponds to listing all unlicensed users in the tenant.
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.
✗
To list all users with sign-in blocked
Why it's wrong here
Blocked status is not checked.
✗
To list all unlicensed users with a specific usage location
Why it's wrong here
No usage location filter is applied.
✓
To list all unlicensed users in the tenant
Why this is correct
The filter selects users without a license.
Related concept
Read the scenario before looking for a memorised answer.
✗
To list all users who have a license assigned
Why it's wrong here
It filters for unlicensed users.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates may confuse the `assignedLicenses/$count eq 0` filter with a filter for unlicensed users in a specific location or with sign-in status, but the command lacks any additional filters for usage location or account status.
Detailed technical explanation
How to think about this question
The `assignedLicenses/$count eq 0` filter uses the OData `$count` query option, which requires the `-ConsistencyLevel eventual` parameter to ensure consistent results across directory replicas. This command leverages the Microsoft Graph PowerShell SDK's `Get-MgUser` cmdlet, which queries the `/users` endpoint. In real-world scenarios, this is commonly used to identify users who need license assignment before enabling services like Exchange Online or SharePoint Online.
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 media company stores terabytes of video archives that are accessed once a year for audit purposes. Moving these objects to a cold storage tier (Azure Archive, S3 Glacier, or Google Nearline) costs a fraction of hot storage. Questions like this test whether you understand storage tiers, access frequency tradeoffs, and retrieval latency requirements.
Related glossary terms
Concepts from this question explained
These glossary pages explain the core terms tested in this MS-102 question in full detail.
Deploy and manage a Microsoft 365 tenant — This question tests Deploy and manage a Microsoft 365 tenant — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: To list all unlicensed users in the tenant — The PowerShell command `Get-MgUser -Filter 'assignedLicenses/$count eq 0' -ConsistencyLevel eventual` retrieves all users in the Microsoft 365 tenant who have no licenses assigned. The `assignedLicenses/$count eq 0` filter checks that the count of assigned licenses is zero, and `-ConsistencyLevel eventual` is required for advanced queries on directory objects. This directly corresponds to listing all unlicensed users in the tenant.
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.
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 →
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.
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.
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.
Sign in to join the discussion.