Get Mail error using Microsoft Office 365 Scope

Hi,
I’m using Microsoft Office 365 Scope and the Get Mail activity inside to get a list of all messages in my email account.
This used to work well but suddenly it began throwing a “Get Mail: Value cannot be null. Parameter name: folderPath” on the Get Mail Activity.

The Microsoft Office365 Scope properties used are (properties not provided are null):

  • Application Id:
  • Authentication: Interactive
  • Environment: Global
  • Services: Mail
  • Tenant: “Prod”
  • OAuthApplication: UiPath

And the properties for the Get Mail activity are:

  • Mail Folder: “Inbox”
  • Results: EmailList (an Office365Message object)

The version of the UiPath.MicrosoftOffice365.Activities package is v1.11.1
Studio version is 2021.4.4 and we’re testing in both attended and unattended robots with the same results.

The nature of the message seems to show there’s a problem with a folderName. I thought it could be the name of the email folder, but it’s the standard “Inbox” folder, and also this was working a few days ago…

Hi @malbajar

Are you still reproducing the issue?
I’ve just tested it with both UiPath.MicrosoftOffice365.Activities v1.11.1 and v1.12.1-preview and I successfully retrieved emails from the Inbox folder of my shared mailbox.

It the issue persists try the following:

  1. In scope activity, make sure that Mail & Shared services are selected.
  2. Delete the locally stored “office365.tokens…” token file from %appdata%\UiPath\authentication
  3. Run the workflow again.

Any update on this, i am getting same error

If you’re still having trouble, please post properties of your GetMail activity. I’m wondering if the Account property is valued. It is required even though the Scope activity provides credentials.

I had the same error, try changing “Inbox” by a different language “Bandeja de entrada”, that works in my case.

1 Like

@malbajar Have you resolved this? I’m facing the same issue.
I’m using UiPath.MicrosoftOffice365.Activities package v1.14.1

The Microsoft Office365 Scope properties used are :

  • Application Id:applicationId
  • Authentication Type: IntegratedWindowsAuthentication
  • Environment: Global
  • Services: Mail, Shared
  • Tenant: TenantId
  • OAuthApplication: Custom

And the properties for the Get Mail activity are:

  • Mail Folder: “Inbox”
  • Account:SharedMailbox
  • Results: EmailList (an Office365Message object)

The error message returned is :- “Get Mail: Code: generalException
Message: An error occurred sending the request.”
it does not explain anything.

IT has done the setup and provided the API permissions
as per Setup

Please help
Regards,
Thanu Thomas

Hi @thanu.thomas,

Any solutions?

I’m getting same error too. The interesting part is this request works on development machine but not works on production robot.

I can say, all permissions are given because a week ago this request works.

Regards
Ömer

I have used ApplicationIdANdSecret as AuthenticationType and it works now. IntegratedWindowsAuthentication still does not work for me.
If you have issue only in production, check the robot version in production, You will need to upgrade to 2022.4.0 or higher. Your dev machine might be using this version thats why it works.
The Microsoft Office 365 activity package 1.14.1 has UiPath Platform 22.4.0 as a dependency, so you would need to upgrade to Studio/Robot 22.4. for it to work.
check this link

Any solution. I have the same problem.

Thanks