I have to automate login into Citrix VDI but it has two-factor authentication which has two options.
1.) Send OTP code in Mobile SMS
2) Get a call on mobile and click a particular number as per instruction
Please help me on this how can I automate this so I can make Unattended robot.
Two-Factor authentication is pretty hard, but might be doable. The issue is you need to get the code from the phone to the desktop. The only option I can think of is as follows:
Desktop
login to citrix up to the point a code is sent to the mobile phone
Mobile
connect the phone to the same desktop, and install a remote viewer app, like TeamViewer or some other.
add a delay to make sure the text message gets there
next steps could be done with ComputerVision or (I guess) Mobile automation
you’ll need to find a way to “open” the phone, like pressing the home button. I think the mobile remote app should have some way of triggering those hardware buttons.
using CV or Mobile automation unlock the phone by entering the PIN# (should be easier if the phone authentication is with a PIN than with the swipy thing android has)
go to text messages
go to the contact that sent the Citrix auth code
scrape the area of the screen that contains the message
do some string manipulation on it to get only the code
Can’t you consider to deploy this as an attendee automation in pip mode ? this is because the user can attend the call for authentication after triggering the bot , post which the bot can perform in pip and the user can continue their work on their system
The solution would be , the user triggers the bot manually from the assistant in pip mode , and at the point where the otp needs to be entered you can introduce an input box asking for the otp , which again the user will enter manually and submit to the bot . the bot then takes it up from there. All this should happen in pip and the user can enter pip mode to put in the opt .send an email to the user before the input box so that they know an opt is expected from them manually at this point . had implemented something similar 2 years back and worked fine
There are apps that will forward text messages to an email address. I’ve never used them, but this might be an option for you. You could have the app on the phone redirect the text message to an email address that your automation can check for the OTP code. One example of these apps is named SMS Forwarder.