1--- 2layout: "api" 3page_title: "/sys/mfa/method/duo - HTTP API" 4sidebar_title: "<code>/sys/mfa/method/duo</code>" 5sidebar_current: "api-http-system-mfa-duo" 6description: |- 7 The '/sys/mfa/method/duo' endpoint focuses on managing Duo MFA behaviors in Vault Enterprise. 8--- 9 10## Configure Duo MFA Method 11 12This endpoint defines a MFA method of type Duo. 13 14| Method | Path | 15| :----------------------------- | :--------------------- | 16| `POST` | `/sys/mfa/method/duo/:name` | 17 18### Parameters 19 20- `name` `(string: <required>)` – Name of the MFA method. 21 22- `mount_accessor` `(string: <required>)` - The mount to tie this method to for use in automatic mappings. The mapping will use the Name field of Aliases associated with this mount as the username in the mapping. 23 24- `username_format` `(string)` - A format string for mapping Identity names to MFA method names. Values to substitute should be placed in `{{}}`. For example, `"{{alias.name}}@example.com"`. If blank, the Alias's Name field will be used as-is. Currently-supported mappings: 25 - alias.name: The name returned by the mount configured via the `mount_accessor` parameter 26 - entity.name: The name configured for the Entity 27 - alias.metadata.`<key>`: The value of the Alias's metadata parameter 28 - entity.metadata.`<key>`: The value of the Entity's metadata parameter 29 30- `secret_key` `(string)` - Secret key for Duo. 31 32- `integration_key` `(string)` - Integration key for Duo. 33 34- `api_hostname` `(string)` - API hostname for Duo. 35 36- `push_info` `(string)` - Push information for Duo. 37 38### Sample Payload 39 40```json 41{ 42 "mount_accessor": "auth_userpass_1793464a", 43 "secret_key": "BIACEUEAXI20BNWTEYXT", 44 "integration_key":"8C7THtrIigh2rPZQMbguugt8IUftWhMRCOBzbuyz", 45 "api_hostname":"api-2b5c39f5.duosecurity.com" 46} 47``` 48 49### Sample Request 50 51``` 52$ curl \ 53 --header "X-Vault-Token: ..." \ 54 --request POST \ 55 --data @payload.json \ 56 http://127.0.0.1:8200/v1/sys/mfa/method/duo/my_duo 57``` 58 59## Read Duo MFA Method 60 61This endpoint queries the MFA configuration of Duo type for a given method 62name. 63 64| Method | Path | 65| :----------------------------- | :----------------------- | 66| `GET` | `/sys/mfa/method/duo/:name` | 67 68### Parameters 69 70- `name` `(string: <required>)` – Name of the MFA method. 71 72### Sample Request 73 74``` 75$ curl \ 76 --header "X-Vault-Token: ..." \ 77 --request GET \ 78 http://127.0.0.1:8200/v1/sys/mfa/method/duo/my_duo 79 80``` 81 82### Sample Response 83 84```json 85{ 86 "data": { 87 "api_hostname": "api-2b5c39f5.duosecurity.com", 88 "id": "0ad21b78-e9bb-64fa-88b8-1e38db217bde", 89 "integration_key": "BIACEUEAXI20BNWTEYXT", 90 "mount_accessor": "auth_userpass_1793464a", 91 "name": "my_duo", 92 "pushinfo": "", 93 "secret_key": "8C7THtrIigh2rPZQMbguugt8IUftWhMRCOBzbuyz", 94 "type": "duo", 95 "username_format": "" 96 } 97} 98``` 99## Delete Duo MFA Method 100 101This endpoint deletes a Duo MFA method. 102 103| Method | Path | 104| :----------------------------- | :----------------------- | 105| `DELETE` | `/sys/mfa/method/duo/:name` | 106 107 108### Parameters 109 110- `name` `(string: <required>)` - Name of the MFA method. 111 112### Sample Request 113 114``` 115$ curl \ 116 --header "X-Vault-Token: ..." \ 117 --request DELETE \ 118 http://127.0.0.1:8200/v1/sys/mfa/method/duo/my_duo 119 120``` 121