Get phone number in MFA_ENROLL state

In Authentication Api,

Is it possible to get primaryPhone/mobilePhone information inside profile object in MFA_ENROLL state ?

{
    "stateToken": "-qcif",
    "expiresAt": "2019-10-20T19:31:05.000Z",
    "status": "MFA_ENROLL",
    "_embedded": {
        "user": {
            "id": "qqq",
            "passwordChanged": "2019-10-20T19:25:53.000Z",
            "profile": {
                "login": "",
                "firstName": "test",
                "lastName": "tes5",
                "locale": "en",
                "timeZone": "America/Los_Angeles"
            }
        },
        "factors": [
            {
                "factorType": "sms",
                "provider": "OKTA",
                "vendorName": "OKTA",
                "_links": {
                    "enroll": {
                        "href": "https://dev.okta.com/api/v1/authn/factors",
                        "hints": {
                            "allow": [
                                "POST"
                            ]
                        }
                    }
                },
                "status": "NOT_SETUP",
                "enrollment": "OPTIONAL"
            }
        ]
    },
    "_links": {
        "cancel": {
            "href": "https://dev.okta.com/api/v1/authn/cancel",
            "hints": {
                "allow": [
                    "POST"
                ]
            }
        }
    }
}

Hi @pravinarr

Unfortunately no, there are only a limited number of attributes that are being displayed. Based on user.id, you can do a second request to /api/v1/users/:userId and retrieve the user’s phone number.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.