# MFA authentication method missing in rule context

**URL:** <https://community.auth0.com/t/mfa-authentication-method-missing-in-rule-context/49218>\
**Category:** Get Help\
**Tags:** rule, mfa-sms, mfa\
**Created:** [September 4, 2020, 10:59am UTC](https://community.auth0.com/t/mfa-authentication-method-missing-in-rule-context/49218 "2020-09-04T10:59:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mobilmacher](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mobilmacher/32/13482_2.png) [@mobilmacher](https://community.auth0.com/u/mobilmacher)\
**Post date:** [September 4, 2020, 10:59am UTC](https://community.auth0.com/t/mfa-authentication-method-missing-in-rule-context/49218/1 "2020-09-04T10:59:13Z")

</div>

I’m having trouble with a rule checking if a user completed MFA during their login.

According to the [docs](https://auth0.com/docs/rules/context-object), the ‘context.authentication’ array should contain the authentication methods a user has completed during their session. However, the ‘mfa’ method is never present. The only output I get is the following array:

`[{ methods: [{ name: 'pwd', timestamp: 1434454643024 }] }]`

I’m using the free SMS method from Auth0 for testing and the new universal login experience with SSO. ‘allowRememberBrowser’ is also set to true.

The login and the MFA authentication works fine. Just the mfa object is missing for some reasons.

Any ideas?

---

<div class="post-metadata">

**Author:** ![joseantonio.rey](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/joseantonio.rey/32/14670_2.png) [@joseantonio.rey](https://community.auth0.com/u/joseantonio.rey)\
**Post date:** [September 5, 2020, 5:36pm UTC](https://community.auth0.com/t/mfa-authentication-method-missing-in-rule-context/49218/2 "2020-09-05T17:36:42Z")

</div>

Hey @mobilmacher,

Rules execute before MFA is triggered. This means that, when the user is authenticated and rules run, MFA will not yet have been triggered. However, if the user has already authenticated and your application is performing SSO of an existing session, the array will be there, informing you of what kind of MFA flow went on during the original authentication flow.

Let me know if this helps.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [September 20, 2020, 5:36pm UTC](https://community.auth0.com/t/mfa-authentication-method-missing-in-rule-context/49218/3 "2020-09-20T17:36:52Z")

</div>

Auth0 has a newer set of APIs for managing API documented [here](https://auth0.com/docs/secure/multi-factor-authentication/customize-mfa/customize-mfa-selection-universal-login#customize-your-mfa-flows) which is available in Actions.

```auto
api.authentication.enrollWith
api.authentication.enrollWithAny
api.authentication.challengeWith
api.authentication.challengeWithAny

```

Using these APIs, the flow continues from [the next Action available](https://community.auth0.com/t/action-be-execution-after-a-user-has-successfully-completed-an-mfa-challenge/136533).

With Actions, it is possible to access the user’s MFA status with `event.authentication.methods`
