> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/continuous-delivery/use-continuous-delivery/cd-building-blocks/cd-steps/approvals/using-harness-approval-steps-in-cd-stages.md).

# Using manual Harness approval steps in CD stages

Approve or reject a Continuous Delivery stage with a Harness user group during execution

You can let one or more Harness user groups approve or reject a Continuous Delivery (CD) stage at any point in its execution.

During deployment, members of the user group approve or reject the deployment manually in Harness Manager.

Approvals are usually added between stage steps so the stage does not continue without an approval.

For example, in a [Kubernetes blue green deployment](/continuous-delivery/use-continuous-delivery/deploy-services-on-different-platforms/kubernetes/kubernetes-executions/create-a-kubernetes-blue-green-deployment.md), add an approval step between the stage deployment step and the **Swap Primary with Stage** step. The deployment step deploys the new app version to the staging environment. **Swap Primary with Stage** routes production traffic to the pods for the new version.

***

## What you will learn from this topic

* How to [add a Harness Approval step](#add-an-approval-step-in-a-cd-stage) in a Continuous Delivery stage
* How to [review the approval during pipeline execution](#video), including comments and variables
* How to [use the sample YAML](#sample-yaml) for a manual approval step

***

## Before you begin

You need the following before you add the step:

* **Continuous Delivery stage**: A stage in which you can add an execution step. Place the approval between the steps that must wait.
* **User group**: A Harness user group. Members of that group approve or reject the deployment in Harness Manager.

***

## Add an approval step in a Continuous Delivery stage <a href="#add-an-approval-step-in-a-cd-stage" id="add-an-approval-step-in-a-cd-stage"></a>

Perform the following steps to add a Harness Approval step:

1. In the Continuous Delivery stage, select **Execution** -> **Add Step**.
2. Select **Harness Approval**. The **Harness Approval** settings appear.
3. Go to [Using manual Harness approval stages](https://developer.harness.io/docs/platform/approvals/adding-harness-approval-stages/) to configure the approval step for manual intervention.

***

## Review the approval during execution <a href="#video" id="video"></a>

This is a manual approval step during pipeline execution.

![Harness Approval step waiting for approval, with the message Test, input foo set to bar, and Approve and Reject](https://3694223630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy1JhZ4oKIppwY7d5AhPj%2Fuploads%2Fgit-blob-fd51925d9a59c529d5a6a5e41843d4bbc8dec27a%2Fusing-harness-approval-steps-in-cd-stages-00.png?alt=media)

An approver can approve or reject the step, stopping the pipeline. The approver can also add comments and define variables for use by subsequent approvers and steps.

This video shows how to set up and run the step.

{% embed url="<https://www.youtube.com/watch?v=V-d6kaMBf-w>" %}
Set up and run a manual approval step
{% endembed %}

***

## Sample YAML <a href="#sample-yaml" id="sample-yaml"></a>

This is a manual approval step in YAML.

```yaml
- step:
    type: HarnessApproval
    name: Harness Approval Step
    identifier: Harness_Approval_Step
    timeout: 1d
    spec:
      approvalMessage: Test
      includePipelineExecutionHistory: true
      approvers:
        userGroups:
          - docs
        minimumCount: 1
        disallowPipelineExecutor: false
      approverInputs:
        - name: foo
          defaultValue: bar
      isAutoRejectEnabled: false
```

***

## Next steps <a href="#see-also" id="see-also"></a>

* [Update Jira issues in CD stages](/continuous-delivery/use-continuous-delivery/cd-building-blocks/cd-steps/ticketing-systems/update-jira-issues-in-cd-stages.md): Update a Jira issue during pipeline execution.
* [Harness approval API](/continuous-delivery/troubleshooting-and-resources/knowledge-base-article/harness-approval-api.md): Use the Harness approval API.
* [Adding ServiceNow approval steps and stages](https://developer.harness.io/docs/platform/approvals/service-now-approvals/): Add a ServiceNow approval step or stage.

{% @harness-feedback/feedback %}
