Bulk remove group members in Microsoft Entra ID
You can remove a large number of members from a group by using a comma-separated values (CSV) file to remove group members in bulk using 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:
CSV template structure
The rows in a downloaded CSV template are:
- Version number: The first row that contains the version number must be included in the upload CSV.
- 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 choose the member object ID or the user principal name. - Examples row: The template includes a row of examples of acceptable values for each column. You must remove the examples row and replace it with your own entries.
More guidance
- The first two rows 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 other columns you add are ignored and not processed.
- We recommend that you download the latest version of the CSV template as often as possible.
Bulk remove group members
Tip
Steps in this article might vary slightly based on the portal you start from.
Sign in to the Microsoft Entra admin center as at least a Groups Administrator.
Select Identity.
Select Groups > All groups.
Open the group from which you're removing members and then select Members.
On the Members page, select Remove members.
On the Bulk remove group members page, select Download to get the CSV file template with required group member properties.
Open the CSV file and add a line for each group member you want to remove from the group. Required values are Member object ID or User principal name. Then save the file.
On the Bulk remove group members page, under Upload your csv file, browse to the file. When you select the file, validation of the CSV file starts.
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.
When your file passes validation, select Submit to start the bulk operation that removes the group members from the group.
When the removal 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 removal service limits.
Check removal status
You can see the status of all your pending bulk requests 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.
Bulk removal service limits
Note
When performing bulk operations, such as import or create, you may encounter a problem if the bulk operation does not 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 are limiting the data returned by the bulk operation. For more information, see Bulk operations service limitations.