Outlook Activity Fails Because Request Is Only Valid With Delegated Authentication Flow

Outlook-related activity within the MS Office365 Activities package fails with error: "Get Mail: Code: BadRequest Message: /me request is only valid with delegated authentication flow".

Issue Description

The activities interacting with Outlook items as described in the Outlook Activities page can fail in Studio at runtime with the error:


Root Cause

This happens when the Microsoft Office 365 Scope activity (the one hosting all the other MS Office 365 activities) is configured to use "ApplicationIdAndSecret" as authentication type, but the Get Mail activity (or any other Outlook-related activity) does not have the Account property configured.


Resolution

  1. The Account value must be filled in as recommended in the documentation of the activity.
  1. If this still fails, add the email address to the "From" section under options.

image.png


5 Likes

I am also having same issue. Can anyone please provide the solution for this?
Thanks in advance!

Thanks! This helps for UiPath.MiscrosoftOffice365.Activities.Files.UploadFile also.

Any solution?
I have a solution stuck due to this problem. When I add the account to the input section, the error generated is different:

Iā€™m getting the following error. Any suggestions?
image