Remove Users from a Group

This API is used to remove Users from a Group. Removing a User from a Group removes their Group membership. Removing a User from a Group effectively modifies their assigned Roles if Application Roles are being managed through the Group membership.

Request#

API Key Authentication
Remove a single User from a Group by Member Id
DELETE/api/group/member/{memberId}

Request Parameters#

memberIdUUIDrequired

The unique Id of the Group Member to delete.

Request Headers#

X-FusionAuth-TenantIdStringoptional

The unique Id of the tenant used to scope this API request.

The tenant Id is not required on this request even when more than one tenant has been configured because the tenant can be identified based upon the request parameters or it is otherwise not required.

Specify a tenant Id on this request when you want to ensure the request is scoped to a specific tenant. The tenant Id may be provided through this header or by using a tenant locked API key to achieve the same result.

See Making an API request using a Tenant Id for additional information.


API Key Authentication
Remove a single User from a Group by User Id and Group Id
DELETE/api/group/member?groupId={groupId}&userId={userId}
OpenAPI Spec

Request Parameters#

groupIdUUIDrequired

The unique Id of the Group to remove the User from.

userIdUUIDrequired

The unique Id of the User to remove from the Group.

Request Headers#

X-FusionAuth-TenantIdStringoptional

The unique Id of the tenant used to scope this API request.

The tenant Id is not required on this request even when more than one tenant has been configured because the tenant can be identified based upon the request parameters or it is otherwise not required.

Specify a tenant Id on this request when you want to ensure the request is scoped to a specific tenant. The tenant Id may be provided through this header or by using a tenant locked API key to achieve the same result.

See Making an API request using a Tenant Id for additional information.


API Key Authentication
Remove all Users from a Group
DELETE/api/group/member?groupId={groupId}
OpenAPI Spec

Note, in version 1.36.0 the Member API supports the PUT method allowing you to replace all members in the Group.

As of version 1.36.0 this API is deprecated, in favor of using the PUT method. Prefer the use of PUT /api/group/member with an empty array of members to effectively remove all members from the group.

Request Parameters#

groupIdUUIDrequired

The unique Id of the Group.

Request Headers#

X-FusionAuth-TenantIdStringoptional

The unique Id of the tenant used to scope this API request.

The tenant Id is not required on this request even when more than one tenant has been configured because the tenant can be identified based upon the request parameters or it is otherwise not required.

Specify a tenant Id on this request when you want to ensure the request is scoped to a specific tenant. The tenant Id may be provided through this header or by using a tenant locked API key to achieve the same result.

See Making an API request using a Tenant Id for additional information.

API Key Authentication
Remove Users from a Group by Member Id
DELETE/api/group/member
OpenAPI Spec

Request Headers#

X-FusionAuth-TenantIdStringoptional

The unique Id of the tenant used to scope this API request.

The tenant Id is not required on this request even when more than one tenant has been configured because the tenant can be identified based upon the request parameters or it is otherwise not required.

Specify a tenant Id on this request when you want to ensure the request is scoped to a specific tenant. The tenant Id may be provided through this header or by using a tenant locked API key to achieve the same result.

See Making an API request using a Tenant Id for additional information.

Request Body#

memberIdsArrayrequired

An array of member Ids to delete.

Example Request JSON

{
  "memberIds": [
    "222b884b-a0a1-4563-a957-89c7c0513e6e",
    "80d474bf-0dee-4009-b793-ec1255693fa3",
    "16d98a8b-4205-4441-8831-7e3f73154134"
  ]
}
API Key Authentication
Remove specified Users from a Group by Group Id
DELETE/api/group/member
OpenAPI Spec

Request Headers#

X-FusionAuth-TenantIdStringoptional

The unique Id of the tenant used to scope this API request.

The tenant Id is not required on this request even when more than one tenant has been configured because the tenant can be identified based upon the request parameters or it is otherwise not required.

Specify a tenant Id on this request when you want to ensure the request is scoped to a specific tenant. The tenant Id may be provided through this header or by using a tenant locked API key to achieve the same result.

See Making an API request using a Tenant Id for additional information.

Request Body#

members[groupId][x]Arrayrequired

An array of User Ids to remove from the Group specified by Group Id.

Example Request JSON

{
  "members": {
    "1188edfc-cef3-4555-910e-181ddf6153c0": [
      "578e52df-83e8-48ca-899b-3aefd56e7fc5",
      "0928cf95-34d1-44cc-9114-da68a07e5ff8"
    ]
  }
}

Response#

This API does not return a JSON response body.

Response Codes
CodeDescription
200The request was successful.
400The request was invalid and/or malformed. The response will contain an Errors JSON Object with the specific errors. This status will also be returned if a paid FusionAuth license is required and is not present.
401You did not supply a valid Authorization header. The header was omitted or your API key was not valid. The response will be empty. See Authentication.
404The object you requested doesn't exist. The response will be empty.
500There was an internal error. A stack trace is provided and logged in the FusionAuth log files. The response will be empty.