Unattended Office365 mark email as Read/Unread failing

Hello everyone,

My unattended robot is failing to use the Office 365 activity to mark a mail as read.
When running attended the activity executes with no problem.

Schermafbeelding 2023-04-21 104135

Code: generalException
Message: An error occurred sending the request.

at Microsoft.Graph.SimpleHttpProvider.SendRequestAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
at Microsoft.Graph.SimpleHttpProvider.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
at Microsoft.Graph.BaseRequest.SendRequestAsync(Object serializableObject, CancellationToken cancellationToken, HttpCompletionOption completionOption)
at Microsoft.Graph.BaseRequest.SendAsync[T](Object serializableObject, CancellationToken cancellationToken, HttpCompletionOption completionOption)
at Microsoft.Graph.MessageRequest.UpdateAsync(Message messageToUpdate, CancellationToken cancellationToken)
at UiPath.MicrosoftOffice365.Services.GraphServiceClientProxy.MarkAsReadUnreadAsync(MarkAsReadUnreadRequest request, CancellationToken cancellationToken)
at UiPath.MicrosoftOffice365.Activities.Mail.MarkAsReadUnreadConnections.ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)
at UiPath.Shared.Activities.AsyncTaskCodeActivityImplementation.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Greetings,
uiStijn

Hi,

I see you have AuthenticationType = InteractiveToken. According to UiPath documentation, it is not supported for Unattended. Since you’re providing the username and password, can you try setting AuthenticationType to UserNameAndPassword?

Thank you @efelantti

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.