Edit

Share via


Bulk add group members in Microsoft Entra ID

You can add multiple members to a group by using a comma-separated values (CSV) file to bulk import group members in the portal for Microsoft Entra ID.

Understand the CSV template

Download and fill in the bulk upload CSV template to successfully add Microsoft Entra group members in bulk. Your CSV template might look like this example:

Screenshot that shows the spreadsheet for upload and call-outs explaining the purpose and values for each row and column.

CSV template structure

The rows in a downloaded CSV template are:

  • Column headings: The format of the column headings is <Item name> [PropertyName] <Required or blank>. An example is Member object ID or user principal name [memberObjectIdOrUpn] Required. Some older versions of the template might have slight variations. For group membership changes, you can use either the member object ID or the user principal name (UPN).
  • Examples row: The template includes a row of example values (for example, Example: 9832aad8-e4fe-496b-a604-95c6eF01ae75). You must remove the examples row and replace it with your own entries.

Note

CSV template formats vary by operation. Some templates (like bulk create or delete users) include a version:v1.0 row as the first row, while others (like group member operations) start directly with the column headers. Always use the template downloaded directly from the portal for your specific operation, and don't modify the first row(s).

More guidance

  • The first row(s) of the upload template must not be removed or modified, or the upload can't be processed.
  • The required columns are listed first.
  • We don't recommend adding new columns to the template. Any additional columns you add are ignored and not processed.
  • We recommend that you download the latest version of the CSV template as often as possible.
  • Add at least two users' UPNs or object IDs to successfully upload the file.
  • Enter one member per row. Don't use semicolons or other delimiters to separate multiple members in a single row.

Example CSV file

Here's an example of a completed CSV file ready for upload, matching the current template format. This example uses user principal names (UPNs):

Member object ID or user principal name [memberObjectIdOrUpn] Required
alain@contoso.com
isabella@contoso.com
joseph@contoso.com
chaya@contoso.com

Alternatively, you can use object IDs instead of UPNs:

Member object ID or user principal name [memberObjectIdOrUpn] Required
00aa00aa-bb11-cc22-dd33-44ee44ee44ee
11bb11bb-cc22-dd33-ee44-55ff55ff55ff
22cc22cc-dd33-ee44-ff55-66aa66aa66aa

Tip

To find a user's object ID, go to Identity > Users > All users, select the user, and copy the Object ID from the user's profile page.

Bulk import group members

  1. Sign in to the Microsoft Entra admin center as at least a Groups Administrator.

  2. Navigate to Identity.

    Note

    Group owners can also bulk import members of groups they own.

  3. Select Groups > All groups.

  4. Open the group to which you're adding members and then select Members.

  5. On the Members page, select bulk operations and then choose Import members.

  6. On the Bulk import group members page, select Download to get the CSV file template with required group member properties.

    Screenshot that shows the Import Members command is on the profile page for the group.

  7. Open the CSV file and add a line for each group member you want to import into the group. For each member, enter either their User principal name (UPN, such as user@contoso.com) or their Object ID (a GUID like 00aa00aa-bb11-cc22-dd33-44ee44ee44ee). Enter one member per row. Then save the file.

    Screenshot that shows the CSV file contains names and IDs of the members to import.

  8. On the Bulk import group members page, under Upload your csv file, browse to the file. When you select the file, validation of the CSV file starts.

  9. When the file contents are validated, the bulk import page displays File uploaded successfully. If there are errors, you must fix them before you can submit the job.

  10. When your file passes validation, select Submit to start the bulk operation that imports the group members to the group.

  11. When the import operation finishes, a notification states that the bulk operation succeeded.

If you experience errors, you can download and view the results file on the Bulk operation results page. The file contains the reason for each error. The file submission must match the provided template and include the exact column names.

For more information about bulk operations limitations, see Bulk import service limits.

Check import status

You can see the status of all of your pending bulk requests in the Bulk operation results page.

  1. Navigate to Identity > Users > Bulk operation results.
  2. Find your bulk operation in the list. The Status column shows whether the operation is In Progress, Succeeded, or Failed.

Screenshot that shows the Check status option on the Bulk operation results page.

For details about each line item within the bulk operation, select the values under the # Success, # Failure, or Total Requests columns. If failures occurred, the reasons for failure are listed.

Download the results file

To download detailed results:

  1. On the Bulk operation results page, select the operation you want to review.
  2. Select Download to get a CSV file containing the status of each row from your original upload.
  3. Open the CSV file to see which members were added successfully and which failed, along with specific error messages.

Common errors include:

  • Member not found: The UPN or object ID doesn't exist in your directory.
  • Member already exists: The user is already a member of the group.
  • Invalid format: The UPN or object ID format is incorrect.

Bulk import service limits

Note

When performing bulk operations, such as import or create, you can encounter a problem if the bulk operation doesn't complete within the hour. To work around this issue, we recommend splitting the number of records processed per batch. For example, before starting an export you could limit the result set by filtering on a group type or user name to reduce the size of the results. By refining your filters, essentially you limit the data returned by the bulk operation. For more information, see Bulk operations service limitations.

Next steps