# Multi-factor Authentication - automation testing

**URL:** <https://devforum.okta.com/t/multi-factor-authentication-automation-testing/4356>\
**Category:** Questions\
**Created:** [March 1, 2019, 3:12pm UTC](https://devforum.okta.com/t/multi-factor-authentication-automation-testing/4356 "2019-03-01T15:12:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mxj](https://avatars.discourse-cdn.com/v4/letter/m/f07891/32.png) [@mxj](https://devforum.okta.com/u/mxj)\
**Post date:** [March 1, 2019, 3:12pm UTC](https://devforum.okta.com/t/multi-factor-authentication-automation-testing/4356/1 "2019-03-01T15:12:40Z")

</div>

I am using selenium for automation testing and web has a OKTA multi-factor authentication, which requires a code to be sent to phone/email. I don’t want to be using 3rd part website to reterive code and looking for possible solution which allows me to get code without having to be sent to a phone/email.

---

<div class="post-metadata">

**Author:** ![mxj](https://avatars.discourse-cdn.com/v4/letter/m/f07891/32.png) [@mxj](https://devforum.okta.com/u/mxj)\
**Post date:** [March 5, 2019, 10:19am UTC](https://devforum.okta.com/t/multi-factor-authentication-automation-testing/4356/2 "2019-03-05T10:19:48Z")

</div>

Please could someone help me?

---

<div class="post-metadata">

**Author:** ![gdreed31](https://avatars.discourse-cdn.com/v4/letter/g/ea5d25/32.png) [@gdreed31](https://devforum.okta.com/u/gdreed31)\
**Post date:** [January 31, 2020, 4:04pm UTC](https://devforum.okta.com/t/multi-factor-authentication-automation-testing/4356/3 "2020-01-31T16:04:11Z")

</div>

I would love to hear more about this as well.

---

<div class="post-metadata">

**Author:** ![jmussman](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/jmussman/32/2175_2.png) [@jmussman](https://devforum.okta.com/u/jmussman)\
**Post date:** [September 16, 2020, 4:34am UTC](https://devforum.okta.com/t/multi-factor-authentication-automation-testing/4356/4 "2020-09-16T04:34:40Z")

</div>

Create a test identity that has a policy without MFA. Make sure the identity has least privilege for what it needs to do. Beyond the support answer below I would apply a policy to the identity that only allows authentication from the test computer.

This link to a support case hints at the solution: [https://support.okta.com/help/s/question/0D50Z00008G7V0a/mfa-options-and-automating-ui-and-load-tests?language=en\_US](https://support.okta.com/help/s/question/0D50Z00008G7V0a/mfa-options-and-automating-ui-and-load-tests?language=en_US).

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [January 25, 2024, 12:28am UTC](https://devforum.okta.com/t/multi-factor-authentication-automation-testing/4356/5 "2024-01-25T00:28:08Z")

</div>

Closed on January 25, 2024, 12:28am UTC


