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

# Update or create a configuration for the given MFA method

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

## Request body

- IdentityMfaMethodOktaRequest
  - `api_token` string — Okta API key.
  - `base_url` string — The base domain to use for the Okta API. When not specified in the configuration, "okta.com" is used.
  - `method_id` string — The unique identifier for this MFA method.
  - `org_name` string — Name of the organization to be used in the Okta API.
  - `primary_email` boolean — If true, the username will only match the primary email for the account. Defaults to false.
  - `production` boolean — (DEPRECATED) Use base_url instead.
  - `username_format` string — A template string for mapping Identity names to MFA method names. Values to substitute should be placed in {{}}. For example, "{{entity.name}}@example.com". If blank, the Entity'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)
