---
title: "Create or update a login enforcement"
method: POST
path: "/identity/mfa/login-enforcement/{name}"
tags: ["identity"]
---

# Create or update a login enforcement

`POST /identity/mfa/login-enforcement/{name}`

## Request

- The document declares no server URL.
- Auth: none declared
- TypeScript: <https://skmtc.dev/lensesio/apis/hashicorp-vault-api/docs/identity/mfa/login-enforcement/:name/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- IdentityMfaLoginEnforcementRequest
  - `auth_method_accessors` string[]: Array of auth mount accessor IDs
  - `auth_method_types` string[]: Array of auth mount types
  - `identity_entity_ids` string[]: Array of identity entity IDs
  - `identity_group_ids` string[]: Array of identity group IDs
  - `mfa_method_ids` string[], required: Array of Method IDs that determine what methods will be enforced

## 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.dev/lensesio/apis/hashicorp-vault-api/revisions/bd8194de0697?raw)
