---
title: "Remove a user from the target group."
method: DELETE
path: "/api/hubs/{hub}/users/{userId}/groups/{group}"
tags: ["webpubsub"]
---

# Remove a user from the target group.

`DELETE /api/hubs/{hub}/users/{userId}/groups/{group}`

Remove a user from the target group.

## Path parameters

- `hub` string, required
- `group` string, required
- `userId` string, required

## Query parameters

- `api-version` string, required

## Response `204`

There is no content to send for this request, but the headers may be useful.

## Other responses

- `default` — The error response.

## Changes

- **2026-07-13** (2021-05-01-preview) `3c12a9fc6305` — 1 info
  - api operation id `WebPubSub_RemoveUserFromGroup` removed and replaced with `RemoveUserFromGroup`
- **2026-07-13** (2021-05-01-preview) `db70e5df6e15` — 2 breaking, 1 info
  - the `query` request parameter `api-version` became required
  - removed the success response with the status `200`
  - added the success response with the status `204`
- **2021-04-21** (2021-05-01-preview) `5c057b21a138` — 1 breaking, 1 warning, 3 info
  - removed the success response with the status `204`
  - the optional response header `x-ms-error-code` removed for the status `default`
  - api operation id `RemoveUserFromGroup` removed and replaced with `WebPubSub_RemoveUserFromGroup`
  - the `query` request parameter `api-version` became optional
  - …1 more

[Change history](https://skmtc.dev/azure/apis/webpubsub/changes/api/hubs/:hub/users/:userId/groups/:group/delete.md)

---

[API](https://skmtc.dev/azure/apis/webpubsub.md) · [All operations](https://skmtc.dev/azure/apis/webpubsub/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/webpubsub/revisions/3c12a9fc6305/schema)
