﻿---
title: stack kb alerting-v2 post-alerting-v2-alerts-group-hash-assign cli command
description: Assign an alert to a user Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://www.elastic.co/elastic/docs-builder/docs/4075/reference/elastic-cli/cli/stack/kb/alerting-v2/post-alerting-v2-alerts-group-hash-assign
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# stack kb alerting-v2 post-alerting-v2-alerts-group-hash-assign cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack kb alerting-v2 post-alerting-v2-alerts-group-hash-assign \
  --group-hash <group-hash> \
  --assignee-uid <assignee-uid> \
  --episode-id <episode-id> \
  [options]
```

Assign an alert to a user
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--group-hash string required">
    Hash identifying the alert group to apply the action to.
  </definition>
  <definition term="--assignee-uid string required">
    User profile UID of the assignee, or null to remove the assignee from the episode.
  </definition>
  <definition term="--episode-id string required">
    The episode identifier to assign.
  </definition>
  <definition term="--input-file string">
    path to a JSON file to use as command input
  </definition>
  <definition term="--dry-run">
    validate all inputs and exit without performing any action (preview changes without applying them)
  </definition>
</definitions>


## Global Options

<definitions>
  <definition term="--json">
    output as JSON
  </definition>
</definitions>