How to read one time password (OTP) access code from shared mailbox without seeing Outlook pop up

Hi team,

I want to give you a little background about my process. My process starts by signing into a website - here are the credentials required to login to the website and export report.
• It needs Username
• It needs password
• It needs one time password (OTP)/ access code.
I was able to have the OTP sent to an email (shared mailbox) - however, when I try to read OTP from the inbox there is this security error that I receive when I open and see outlook

I do not want this pop up happens and I was trying to force and make the access security to be On “Never…”, the third check box for the service Account that the bot is using but that does not stick as it reverts back to the default option (the first check box)

Now, my question is there any other option that I can use and allow me to extract the OTP and type back into the Access Code of the website?
Is there any who can help me with this?

Thank you,
Sisay

I can’t give advice on one-time passwords, but to change the settings of Programmatic Access Security in Outlook’s Programmatic Access, you need to start Outlook with administrator privileges and make the change. If you close Outlook after making the change and start it as a normal user, the setting change will remain reflected. I did this when the robot terminal was running Windows Server 2022.
For example, in the case of Windows 11, Outlook can read the settings of antivirus software (such as CrowdStrike other than Windows Defender) and the pop-up does not appear with the Recommended setting, but in the case of Server OS, this is not supported, so you need to change the Outlook settings individually. If your robot terminal is running a Server OS and the antivirus software is not Windows Defender, such as CrowdStrike, this solution will be useful.
As a supplementary note, sometimes when I update Office 365, the Outlook Programmatic Access Security settings revert to the default. In that case, I start Outlook again with administrator privileges and change the settings.
Best Regards.

Hi Hiroaki,
Thank you for taking the time to look into this.
Yes, I did change that - it worked temporarily. However, after 24 hrs it got overwritten and revert back to the default setting (meaning- warn me about…- Is there a way I can run a process to do the change first and the actual process runs soon after that?

Thanks,
Sisay

In such a situation, it seems that the settings are forcibly controlled by the organization’s Group Policy or PowerShell. In that case, you need to consult with the IT team. If UiPath is introduced “top down”, the IT team will often take these things into consideration, but if it is introduced “bottom up”, it is often difficult to communicate with the IT department.

Which activity are you using to read email

There are different options available within UiPath to read email

Example : Via Outlook, via Microsoft Office 365 activities etc.

Try to switch the way you extract OTP and see if outlook is giving you the popup in all the cases

@patent-atanaka - Thank you. Just FYI - this does not happen when I use my personal account. It happens when I use service account (bot account). I am not sure why inconsistent - meaning working while using my account but not working when it is srv acct.
@sharazkm32 - i use outlook (GetOutlookMailMessages) activity. Could you elaborate what specific activity I can use in O365 Scope?

Thanks for your help.
Sisay

1 Like

Please share a screenshot of the main activity you are using to connect outlook

@sharazkm32

Here is the screenshot of the activity that extract OTP from the mailbox.

Please let me know your suggestion.

Thanks,
Sisay