I am working on automating a web portal login process using UiPath. The portal requires a mobile number for login, and an OTP is sent to a registered mobile phone for authentication.
I would like to know the best approach to automate this process. Since the OTP is received on a mobile device and not via email, I am looking for possible solutions to:
Handle OTP validation within the UiPath workflow.
Understand any best practices or recommended approaches for OTP-based authentication automation.
Has anyone implemented a similar solution? Any guidance, sample workflows, or suggestions would be greatly appreciated.
OTP authentication is a security feature, so UiPath does not provide a built-in activity to automatically read OTPs sent to a personal mobile device.
For unattended automation, avoid relying on manual OTP entry. Instead, work with the application team to use API-based authentication or a test configuration designed for automation. This is more secure, reliable, and easier to maintain.
API Integration: If the application provides an authentication API or OTP retrieval mechanism, this is usually the most reliable approach.
SMS Gateway / Mobile Service Integration: If the OTP is sent via SMS and your organization uses a supported SMS provider, you may be able to retrieve the message through an API.
Manual Validation: Prompt the user to enter the OTP using an Input Dialog when full automation is not possible.
Mobile Automation: If the OTP is received on a managed Android device, you could explore UiPath Mobile Automation to read the SMS notification, subject to security policies and device access.
Keep in mind that OTPs are intentionally designed as a second authentication factor, so many applications do not provide a supported way to automate their retrieval.
If not we are following a way as of now ..we have our automations run on adhoc basis..whichever user would get the OTP is the one who triggers the automation..the trigger is basically an email sent to the bot accout and the process starts and one login starts and the bot is on auth code page it would trigger a response email to the same user and ythe user can respond with the code from mobile..automation would run in loop with 30 seconds delay for max 10 minutes and check if a response is received..if yes then the code is extracted and the process continues..this way control is there while logging in and its purely unattended
In addition to the suggestions above, check whether the application supports alternative authentication methods, such as email-based OTP delivery. If the OTP can be sent to an email account, UiPath can automate the process by reading the email and extracting the OTP.
If the OTP is available only on a mobile device, it may be worth discussing with the application owner whether there is an approved API, SSO integration, service account, or other automation-friendly authentication mechanism available.