Office 365 connection to different email accounts

Hi,
We need to read emails from different accounts on MS Azure Office 365.
We’re using the “Office 365 Scope” activity which connects to Azure using any of 4 different authentication methods.
We’ve been able to connect using the “Interactive Token” method. This methods requires a user enters his email account and password manually for the first time and then the connection remains open forever.
This method works well but the problem is you can’t connect to a different email account.

Does anybody know how to connect to Office 365 on Azure and be able to specify the email account you want to connect to ?

Thanks
Marcelo

1 Like

Hi @malbajar1,

Can you follow the video and share the errors you get?

https://docs.uipath.com/activities/docs/microsoft-office-365-scope

Regards,
MY

Hey @malbajar1

Is there any restriction for you to use only interactive token auth ?

Thanks
#nK

Yes. The problem is I want to run multiple processes from a same machine and each one of those processes must read emails from different email accounts.
So that’s why I need to be able to specify which email account the process must connect to. Same as you do with smtp when you complete the email user and password attributes.

1 Like

Yes @malbajar1

Just curious to know why not to use other Auth methods which can give you the possibility!

Thanks
#nK

Thanks for your reply.
Interactive Token connectivity works well but it actually does not use the Username and Password provided. It will just pop up an account selection window from where you’re able to select your account and then the 2-factor authentication will fire.
This requires human interaction and that’s why this is not suitable for unattended execution.
A different authentication method must be used and I’m trying to find an example about how that has to be configured on Azure and on the Office 365 Scope activity.
I believe the “Application Id and Secret” method should work, but I haven’t been able to do it yet…

That is what I’d like to do, but I’m actually looking for information about how to configure that in Azure and on the Office 365 Scope activity.
I think the “Application Id and Secret” should work but I haven’t been able to make it work yet.
I just don’t understand how can you grant access to one account from another, so that when connected with one user you can check another account´s email.

These are some workarounds we identified and could help in dealing with this issue:

  1. Create a Windows Account for each UiPath process you will deploy and login to the email account on each Windows session using Interactive Token.
    Pros:
  • Allows for good segregation of access permissions by process
  • Allows the execution of different UiPath processes on a same machine and each process can access a different email account
    Cons:
  • Requires maintenance of multiple Windows accounts
  • Requires manual login on each Windows account
  • Allows UiPath processes to access only one email account
  1. Manually login to multiple email accounts using Interactive Token authentication, and then hardcode the email account you want to work with on the email activity
    Pros:
  • Allows a UiPath process to access multiple email accounts
  • It does not require multiple Windows accounts
    Cons:
  • Requires “hardcoding” the email account on the email activitiy. Variable value replacement does not work…
  • Email login is manual and requires manual entry of user and pwd each time a machine is booted up
  • The machine keeps multiple email account sessions open, one for each email account required by a UiPath process running on the machine, which can be unacceptable from a security perspective.
  1. Combine the previous 2 methods:
    Pros:
  • Allows good segregation of access permissions
  • Allows access to multiple email account from a single UiPath process
    Cons:
  • Requires “hardcoding” the email account on the email activitiy. Variable value replacement does not work…
  • Email login is manual and requires manual entry of user and pwd each time a machine is booted up
  • Requires maintenance of multiple Windows accounts
  • Requires manual login on each Windows account
2 Likes

Hi,
Can you show me the process?