MS-102 Deploy and manage a Microsoft 365 tenant Practice Question
A company has purchased 1000 Microsoft 365 E5 licenses and wants to automatically assign licenses to users based on their department attribute, which is synchronized from on-premises Active Directory. The department attribute is stored in Azure AD. Which automated method should the administrator use to achieve this?
⚠ Common exam trap
Watch out — candidates often choose a scheduled PowerShell script (Option B) thinking it is more flexible or reliable, but they overlook that group-based licensing is the native, fully automated, and supported method for attribute-driven license assignment in Azure AD.
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
✓
Group-based licensing with dynamic groups
Group-based licensing with dynamic groups is the correct method because it allows automatic license assignment based on user attributes like department, which is synchronized from on-premises Active Directory via Azure AD Connect. Dynamic groups evaluate membership rules in Azure AD, and when a user's department attribute matches the rule, the group-based licensing policy automatically assigns or removes the Microsoft 365 E5 license without manual intervention.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Group-based licensing with dynamic groups
Why this is correct
Dynamic groups in Azure AD use membership rules based on user attributes such as department or location. When a user satisfies the rule, they are automatically added to the group, and licenses assigned to the group are provisioned to that user without manual intervention. If the user no longer meets the rule, they are removed and the license is automatically revoked. This built-in, identity-driven approach scales effortlessly to 1000 users and handles future changes in membership automatically.
- ✗
scheduled PowerShell script that runs daily
Why it's wrong here
A scheduled PowerShell script that invokes Microsoft Graph or MSOnline cmdlets would require custom code, secure credential storage, and robust error handling. You must run it at an interval, yet between runs new users or changed attributes may leave licenses out of sync. This approach demands ongoing maintenance, updates for API deprecations, and monitoring for throttling or failures, making it far less reliable and fully automated than native group-based licensing.
- ✗
Manual license assignment via the Microsoft 365 admin center
Why it's wrong here
Manually assigning licenses in the Microsoft 365 admin center involves selecting each user individually and checking the appropriate license box in the user's properties. With 1000 employees, an administrator must repeat this process for every new hire, every termination, and every change to an employee's role or status, which is time-consuming and prone to human error. This method does not react to directory attribute changes automatically and provides no near-real-time enforcement of licensing policies, so it is unsuitable as an automated solution.
- ✗
Bulk assign licenses using the admin center import feature
Why it's wrong here
The bulk assign feature in the Microsoft 365 admin center lets you upload a CSV file to assign a license to multiple users in a single batch, but this is strictly a one-time, manually initiated operation. Any user added later, or any user whose attributes change so that they should get a different license, will not be automatically updated unless an administrator re-runs another import. There is no continuous monitoring or lifecycle integration, so it cannot keep license assignment aligned with dynamic user attributes over time.
Go deeper
Related to this question
Learn chapter
Microsoft 365 Tenant Setup
Key term
Azure AD Connect
Azure AD Connect is a Microsoft tool that synchronizes on-premises Active Directory identities with Azure Active Directory for unified cloud and on-premises access.
Key term
Policy
A policy is a set of rules or guidelines that defines how an organization manages, secures, and operates its IT systems and services.
About these practice questions
This MS-102 question is part of Courseiva's 241-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.