# enrollFactor for sms - how pass phone number?

**URL:** <https://devforum.okta.com/t/enrollfactor-for-sms-how-pass-phone-number/24578>\
**Category:** Questions\
**Created:** [June 14, 2023, 8:46pm UTC](https://devforum.okta.com/t/enrollfactor-for-sms-how-pass-phone-number/24578 "2023-06-14T20:46:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![swd](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@swd](https://devforum.okta.com/u/swd)\
**Post date:** [June 14, 2023, 8:46pm UTC](https://devforum.okta.com/t/enrollfactor-for-sms-how-pass-phone-number/24578/1 "2023-06-14T20:46:26Z")

</div>

In the previous version I could call `enrollFactor` for sms and pass it the `phoneNumber` through `profile` of the `factor` . How do I do this in v7?

---

<div class="post-metadata">

**Author:** ![erik](https://avatars.discourse-cdn.com/v4/letter/e/b5ac83/32.png) [@erik](https://devforum.okta.com/u/erik)\
**Post date:** [June 17, 2023, 9:40pm UTC](https://devforum.okta.com/t/enrollfactor-for-sms-how-pass-phone-number/24578/2 "2023-06-17T21:40:16Z")

</div>

Hello,

Is your Okta Org a classic Org?  
If so you should be able to,

```auto
factor.enroll({
  profile: {
    phoneNumber: '+1-555-415-1337',
    updatePhone: true
  }
});

```

> <https://github.com/okta/okta-auth-js/blob/master/docs/authn.md#okta-sms>

If your Org is an OIE Org and you are using the Interaction code flow, enrollment is configured via policies in your Okta Org. Below is a link to documentation detailing the steps,

> **[Self-service registration | Okta Developer](https://developer.okta.com/docs/guides/oie-embedded-sdk-use-case-self-reg/nodejs/main/)**
>
> Secure, scalable, and highly available authentication and user management for any app.

The sample app for the above can be found at,

> **[okta-auth-js/samples/generated/express-embedded-auth-with-sdk at master ·...](https://github.com/okta/okta-auth-js/tree/master/samples/generated/express-embedded-auth-with-sdk)**
>
> master/samples/generated/express-embedded-auth-with-sdk

A sample app for client side auth-js can be found at,

> **[okta-auth-js/samples/generated/static-spa at master · okta/okta-auth-js](https://github.com/okta/okta-auth-js/tree/master/samples/generated/static-spa)**
>
> master/samples/generated/static-spa

Thank You,

---

<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:** [February 15, 2024, 6:05pm UTC](https://devforum.okta.com/t/enrollfactor-for-sms-how-pass-phone-number/24578/3 "2024-02-15T18:05:36Z")

</div>

Closed on February 15, 2024, 6:05pm UTC


