OTP on email and mobile - starling

Hi All,

We have added custom workflow for password reset and unlock account. We want to authenticate user via OTP, either on mobile or email . For otp on mobile, we have integrated starling with password manager.

In my customer’s AD environment, they are capturing user’s multiple mobile numbers in otherMobile attribute. So they want an option to select mobile number to receive an otp. But in starling, i am not sure how to do that.

Secondly, for otp on email address we have custom workflow to fetch the email addresses from otherMailbox attribute. Again, user’s multiple address are being captured in otherMailbox attribute. So while resetting the password, they want a dropdown list from which they can select email address to receive an otp.

In PS script of custom workflow i have added this line 

function PostLoad($workflow, $activity)
#Edit this list to specify additional attributes that can contain phone numbers
$PHONE_NUMBER_ATTRS = [string[]] ("mail", "otherMailbox")

# Init global vars
$global:ActualNumbers = @{}

#Obtain user's phone numbers
$user = $global.GetUserById($workflow.UserInfo.Domain, $workflow.UserInfo.Id, $PHONE_NUMBER_ATTRS)

But its not fetching all the email addresses from otherMailbox.