Skip to main content

entra m365group user remove

Removes the specified user from specified Microsoft 365 Group or Microsoft Teams team

Usage

m365 entra m365group user remove [options]

Alias

m365 aad m365group user remove [options]
m365 aad teams user remove

Options

-i, --groupId [groupId]

The ID of the Microsoft 365 Group from which to remove the user

--teamId [teamId]

The ID of the Microsoft Teams team from which to remove the user

-n, --userName <userName>

User's UPN (user principal name), eg. johndoe@example.com

-f, --force

Don't prompt for confirming removing the user from the specified Microsoft 365 Group or Microsoft Teams team

-h, --help [help]

Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, response, full. Default is options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Remarks

You can remove users from a Microsoft 365 Group or Microsoft Teams team if you are owner of that group or team.

Examples

Removes user from the specified Microsoft 365 Group

m365 entra m365group user remove --groupId '00000000-0000-0000-0000-000000000000' --userName 'anne.matthews@contoso.onmicrosoft.com'

Removes user from the specified Microsoft 365 Group without confirmation

m365 entra m365group user remove --groupId '00000000-0000-0000-0000-000000000000' --userName 'anne.matthews@contoso.onmicrosoft.com' --force

Removes user from the specified Microsoft Teams team

m365 entra teams user remove --teamId '00000000-0000-0000-0000-000000000000' --userName 'anne.matthews@contoso.onmicrosoft.com'

Response

The command won't return a response on success.

CTRL + M