How to Bulk Import Entra Users into Dynamic Groups by Department?

Manage Microsoft Entra users and groups
Answer Correct answer: C, D — Create dynamic user groups for automatic department-based membership and write a PowerShell script to parse the import file for bulk user creation.

You have a Microsoft Entra tenant. You plan to perform a bulk import of users. You need to ensure that imported user objects are added automatically as the members of a specific group based on each user's department. The solution must minimize administrative effort. Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

  1. Create groups that use the Assigned membership type.
  2. Create an Azure Resource Manager (ARM) template.
  3. Create groups that use the Dynamic User membership type. Correct Answer
  4. Write a PowerShell script that parses an import file. Correct Answer
  5. Create an XML file that contains user information and the appropriate attributes.

Community Insight

The question tests dynamic group membership for automatic department-based assignment, and the trap is assuming manual assignment or an XML file will satisfy the minimal-effort bulk import requirement.

Learn how to automatically add bulk-imported Microsoft Entra users to groups based on department. This page establishes that dynamic user groups (C) and a PowerShell import script (D) are the correct actions for the AZ-104 scenario when the CSV file option is missing.

Many learners choose the Assigned membership type (A) because it seems straightforward, but it requires manual member management, which directly contradicts the minimize-administrative-effort requirement.

Community Discussion (9 comments)

ELearn 👍 6
Solution Analysis: Dynamic User Membership Type: Azure AD offers dynamic group membership, which automatically adds users to groups based on attributes such as department, job title, etc. By using the Dynamic User membership type, you can create rules (e.g., department equals 'Sales') that automatically manage group membership. This minimizes ongoing administrative effort as users are automatically added/removed from groups based on attribute changes. This solution directly aligns with the requirement to minimize administrative effort and automatically handle group membership. Importing User Information: When performing a bulk import of users, you need a structured format to provide user details such as names, departments, etc. A CSV file is a common format for importing user data into Azure AD. Azure AD supports bulk importing users using a CSV file, which can include attributes necessary for dynamic membership rules (e.g., department).
Ponpon3185 👍 1 Selected: D
Would say D & F cause with just a CSV file you cannot make a Bulk. Question don't speak about Azure portal, so a script is needed to my mind.
Ponpon3185 👍 1 Selected: C
To make a bulk import (question not speak about Azure portal), you need CSV File...and a PS Script
Mark74 👍 3 Selected: C
CF for me
behradcld 👍 3 Selected: C
I would say CDF but there is no third answer so the best choices are CF.
ELearn 👍 4 Selected: C
vote: C&F
siheom 👍 2 Selected: C
vote CF
michael1msc 👍 3 Selected: D
As you don't have option to upload csv to Azure the only option is PowerShell + CSV.
6c05b3d 👍 2
ChatGPT: Correct answer: CF. C. Dynamic groups automatically include members based on specified attributes (like department) that are evaluated using rules. In this scenario, you would create dynamic user groups and define a membership rule based on the department attribute. This eliminates the need for manual assignment or scripting as users are automatically added to the appropriate group based on their department. F. The bulk import of users in Microsoft Entra ID (formerly Azure AD) is typically done using a CSV file. The CSV file allows you to specify user attributes, including the department. Once the users are imported with the department attribute correctly populated, they will automatically be added to the relevant dynamic groups based on the membership rules you set.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

Dynamic User groups (C) are the only option that automatically adds users based on their department attribute, directly fulfilling the requirement to minimize administrative effort for ongoing membership. For the bulk import itself, the standard Entra portal method uses a CSV file, but that option is absent here; option D (write a PowerShell script that parses an import file) is the remaining functional import mechanism. Together, C and D enable bulk user creation and automatic department-based grouping without manual intervention.

Why the Other Options Are Wrong

Option A (Assigned membership) requires manual member additions, violating the minimal-effort goal. Option B (ARM template) cannot create Microsoft Entra user objects because ARM targets Azure resources, not directory users. Option E (XML file) is incorrect because Microsoft Entra bulk import exclusively supports CSV-formatted files; an XML file will not be accepted by the bulk import feature. Thus E cannot be part of a valid solution.

Community Comment Notes

Several learners, including behradcld and Mark74, vote for “CF” — dynamic groups plus a CSV file — indicating the original question likely had a CSV option that is missing from this list. As michael1msc noted, “the only option is PowerShell + CSV” when no direct CSV upload option exists, which supports choosing D in this truncated option set. Ponpon3185 added that the question does not mention the Azure portal, so “a script is needed,” reinforcing D as the practical import action among the choices given.

Official Reference

Exam Strategy

Focus on the 'minimize administrative effort' phrase: it signals that automated membership (dynamic groups) beats manual assignment or custom scripting for ongoing management. Always verify file-format requirements for bulk operations—Entra bulk import uses CSV, not XML.

Frequently Asked Questions

Why are dynamic user groups better than assigned groups for department-based membership?

Dynamic groups automatically add or remove members based on attributes like department, eliminating manual updates and minimizing administrative effort.

Can an XML file be used for Microsoft Entra bulk user import?

No, Microsoft Entra bulk import only supports CSV files. XML is not a supported format for creating multiple users.

Related Analysis

Practice All AZ-104 Questions

Access 100 questions with complete answers and detailed explanations.

View Full AZ-104 Practice Test →

← Back to AZ-104 Study Guide