Unable to get mail using o365 username and password authentication

I’m using Microsoft Office 365 Scope activity with Authentication type set to UsernameAndPassword. App Id, Tenant Id, password, username and Services>Mail filled accordingly.
Inside the 365 Scope Activity I have a Get Mail (UiPath.MicrosoftOffice365.Activities.Mail.GetMail) activity with default settings.
When I run the automation I get the following error:
Get Mail: Code: generalException
Message: An error occurred sending the request.

Works fine when the Authentication type is set to Interactive Token but I need to run this in unattended mode.

Any ideas on what might be wrong?

1 Like

Hey @mishulan

I don’t think AppID or tenant is required ?

Thanks
#nK

Hello @mishulan ,

maybe this post will help you:

I believe you have MFA enabled on your O365 tenant, so Username and password might not work.

Better to use:
Application ID & Secret

Just an idea.

Vasile.