set_admin_mfa
Enable or disable two-factor authentication for a FortiGate administrator, validating prerequisites and previewing changes with dry_run before applying.
Instructions
Turn on two-factor authentication for an administrator: fortitoken (needs an activated token serial), email (needs email_to and a working email server) or sms (needs sms_phone and SMS service); or disable it. Checks the prerequisites first. dry_run (the default) shows the change. Test a login in a private window before closing your current session.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vdom | No | VDOM (default: FORTIGATE_VDOM, usually root) | |
| admin | Yes | Administrator name | |
| method | Yes | fortitoken, email, sms or disable | |
| dry_run | No | Only validate and show the change (default true) | |
| email_to | No | Address for method email | |
| sms_phone | No | Phone number for method sms | |
| fortitoken | No | Token serial for method fortitoken |