---
title: "Update or create a configuration for the given MFA method"
method: POST
path: "/identity/mfa/method/duo/{method_id}"
tags: ["identity"]
---

# Update or create a configuration for the given MFA method

`POST /identity/mfa/method/duo/{method_id}`

## Request body

- IdentityMfaMethodDuoRequest
  - `api_hostname` string — API host name for Duo.
  - `integration_key` string — Integration key for Duo.
  - `method_id` string — The unique identifier for this MFA method.
  - `push_info` string — Push information for Duo.
  - `secret_key` string — Secret key for Duo.
  - `use_passcode` boolean — If true, the user is reminded to use the passcode upon MFA validation. This option does not enforce using the passcode. Defaults to false.
  - `username_format` string — A template string for mapping Identity names to MFA method names. Values to subtitute should be placed in {{}}. For example, "{{alias.name}}@example.com". Currently-supported mappings: alias.name: The name returned by the mount configured via the mount_accessor parameter If blank, the Alias's name field will be used as-is.

## Response `200`

OK

---

[API](https://skmtc.dev/lensesio/apis/hashicorp-vault-api.md) · [All operations](https://skmtc.dev/lensesio/apis/hashicorp-vault-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/lensesio/hashicorp-vault-api/revisions/bd8194de0697/schema)
