---
title: Search MFA Status
slug: kron-pam-api-collection-381-patch3/search-mfa-status
docTags: 
createdAt: 2026-10-21T06:07:16.182Z
---

{
  "id": "dTIeN2toOqgM21r9n00yw",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}/aioc-rest-web/rest/tfa/otpStatus",
    "name": "",
    "description": "<h3>Request Overview</h3>\n<p>The <strong>Search MFA Status</strong> method is used to determine whether MFA (2-Factor Authentication) is enabled for a user in the KRON PAM system.</p>\n<h4>Usage:</h4>\n<ul>\n<li>Provide the username in the <code>\"username\"</code> field within the request body, ensuring it is URL encoded.</li>\n</ul>\n<p>This method returns <code>true</code> if MFA is enabled for the user, and <code>false</code> if it is not.</p>",
    "contentType": "application/json",
    "request": {
      "headerParameters": [
        {
          "name": "Content-Type",
          "description": "",
          "default": "application/x-www-form-urlencoded",
          "value": "application/x-www-form-urlencoded",
          "type": "string"
        },
        {
          "name": "X-XSRF-TOKEN",
          "description": "",
          "default": "{{csrftoken}}",
          "value": "{{csrftoken}}",
          "type": "string"
        }
      ],
      "queryParameters": [],
      "pathParameters": [
        {
          "name": "url",
          "description": "",
          "default": "url",
          "value": "url",
          "type": "string"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [
        {
          "name": "username",
          "description": "",
          "default": "admin",
          "value": "admin",
          "type": "string"
        }
      ],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Search MFA Status",
        "jsonExample": "false"
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "3S3lAPWZ7jKjZvONNkmTY",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/tfa/otpStatus \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/x-www-form-urlencoded' \\\n     --header 'x-xsrf-token: {{csrftoken}}' \\\n     --form 'username=\"admin\"'"
        },
        {
          "id": "kF2g_mZorgCpuo7wZp2P8",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/x-www-form-urlencoded\");\nmyHeaders.append(\"x-xsrf-token\", \"{{csrftoken}}\");\n\nvar formdata = new FormData();\nformdata.append(\"username\", \"admin\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: formdata,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/tfa/otpStatus\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "Ro8zjhxUSHV9PdQqmpP8e",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/tfa/otpStatus\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/x-www-form-urlencoded\"\nrequest[\"x-xsrf-token\"] = \"{{csrftoken}}\"\nform_data = [['username', File.open('undefined')]]\nrequest.set_form form_data, 'multipart/form-data'\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "sEozlkQFGyuYZiyCHq1ij",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/tfa/otpStatus\"\n\npayload = {}\nfiles=[\n\n]\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/x-www-form-urlencoded',\n   'x-xsrf-token': '{{csrftoken}}'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload, files=files)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "3S3lAPWZ7jKjZvONNkmTY"
    },
    "results": {
      "languages": [
        {
          "id": "i4UurxcAVxUY_TuuzbWL5",
          "language": "200",
          "code": "false"
        }
      ],
      "selectedLanguageId": "i4UurxcAVxUY_TuuzbWL5"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}