Automate Two-Factor Authentication to login into Citrix

Hi,

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.

Please help me on this.

Hi @zoyebmansuri! Maybe you can give Mobile Automation a chance: Mobile Device Automation with UiPath Studio (20.4 Community Preview Release)

I don’t know how you could skip the 2-factor authentication but maybe with Mobile Automation you could get through it automatically

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

Desktop

  • enter that code in Citrix

If you encounter difficulties, post here

Go through the below blog, That might help you automate OTP from Text messages:

2 Likes

Thanks seems like an interesting article. However, I have tried using RingCentral app, which gives a virtual phone number to get calls and messages.

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

As we are getting OTP on the mobile number, so not sure how to implement PIP for that.

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 :wink:. had implemented something similar 2 years back and worked fine

We are having Unattended bots, so that’s not an option. However, virtual phone number with RingCentral App I have implemented.

1 Like

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.

Thanks for sharing. I will look into SMS Forwarder.