Courseiva

Automatic License Assignment by Department

A new administrator needs to automatically assign Microsoft 365 E5 licenses to all users in the Sales department. The Sales department is identified by the 'department' attribute in Microsoft Entra ID. Which licensing method should the administrator use to minimize manual effort?

Quick Answer

The answer is group-based licensing using a dynamic group. This method is correct because it leverages Azure AD’s ability to automatically assign Microsoft 365 E5 licenses to every user whose ‘department’ attribute equals ‘Sales’, with the dynamic group evaluating membership rules in real time. As soon as a user’s department attribute is updated, the license is applied or removed without any manual effort, making it the ideal solution for automatic license assignment by department. On the MS-102 exam, this scenario tests your understanding of Azure AD group-based licensing versus direct assignment or PowerShell scripts—a common trap is choosing per-user licensing, which requires ongoing manual updates. Remember the memory tip: “Dynamic groups do the heavy lifting; static groups need a human touch.”

⚠ Common exam trap

It's easy for candidates to choose PowerShell scripting (Option C) thinking it is the most automated method, but they overlook that group-based licensing provides true zero-touch, attribute-driven automation without requiring custom code or scheduled tasks.

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 using a dynamic group

Group-based licensing using a dynamic group is the correct method because it automatically assigns Microsoft 365 E5 licenses to all users in the Sales department based on the 'department' attribute in Microsoft Entra ID. Dynamic groups evaluate membership rules in real time, so when a user's department attribute is set to 'Sales', the license is assigned without manual intervention. This minimizes administrative effort by eliminating the need for per-user or batch operations.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Manual license assignment per user

    Why it's wrong here

    Per-user assignment requires an administrator to select each Sales member individually, so it cannot scale or react to department attribute changes. It remains valid for small tenants or exceptions such as assigning a single licence to a contractor, where no group or rule exists.

  • ✓

    Group-based licensing using a dynamic group

    Why this is correct

    Dynamic groups evaluate the 'department' attribute through membership rules, so users added to Sales are licensed automatically without manual intervention. Group-based licensing then assigns the E5 licence and removes it when users leave, satisfying the requirement to minimise ongoing administrative effort.

  • ✗

    PowerShell script to assign licenses

    Why it's wrong here

    A PowerShell script assigns licences only when executed, so newly created Sales users remain unlicensed until the script is rerun, leaving manual effort. It is tempting because scripting suits bulk one-off assignments, but group-based licensing is the correct choice for automatic, attribute-driven membership.

  • ✗

    Bulk license assignment via CSV file

    Why it's wrong here

    A CSV upload assigns licences once, so any subsequent joiner, mover or leaver in Sales requires a fresh manual import, defeating the automation requirement. It suits one-off bulk onboarding of a fixed user list, not attribute-driven ongoing assignment, which group-based licensing handles dynamically.

About these practice questions

This MS-102 question is part of Courseiva's 712-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 →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on MS-102

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A company purchases Microsoft 365 E5 licenses for 500 users. The administrator wants to automatically assign licenses to new users based on their group membership. Which method should the administrator use?

easy
  • A.Run a PowerShell script to assign licenses individually
  • ✓ B.Configure group-based licensing in Microsoft Entra ID
  • C.Manually assign licenses in the Microsoft 365 admin center for each user
  • D.Use a volume licensing product key to activate licenses

Why B: Group-based licensing in Microsoft Entra ID (formerly Azure AD) allows automatic assignment and removal of licenses based on group membership. When a user is added to a licensed group, the license is automatically assigned; when removed, the license is revoked. This eliminates manual effort and ensures consistent licensing for all 500 users.

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.