Hi All,
I see there’s an attachment limit using the O365 Activities, any attachment that is > 2MB will throw a General Exception Message.
Is there a workaround for this?
Hi All,
I see there’s an attachment limit using the O365 Activities, any attachment that is > 2MB will throw a General Exception Message.
Is there a workaround for this?
The attachment size limit definitely not that much low for sure.
Try increasing the timeout
Hi Ash,
On the O365 I have the timeout configured to “60000”, any email that contains an attachment <2MB works fine. Any file size that is >2MB fails
Here’s the exception message that is thrown during execution:
RemoteException wrapping Microsoft.Graph.ServiceException: Code: generalException
Message: Unexpected exception returned from the service.
at Microsoft.Graph.SimpleHttpProvider.SendAsync(HttpRequestMessage request,
HttpCompletionOption completionOption,
CancellationToken cancellationToken)
at Microsoft.Graph.UploadSliceRequest1.SendRequestAsync(Stream stream, CancellationToken cancellationToken, HttpCompletionOption completionOption) at Microsoft.Graph.UploadSliceRequest
1.PutAsync(Stream stream,
CancellationToken cancellationToken)
at Microsoft.Graph.LargeFileUploadTask1.UploadSliceAsync(UploadSliceRequest
1 uploadSliceRequest,
ICollection1 exceptionTrackingList) at Microsoft.Graph.LargeFileUploadTask
1.UploadAsync(IProgress1 progress, Int32 maxTries) at UiPath.Shared.Services.Graph.Mail.Extensions.FilesExtensions.UploadAttachmentWithSessionAsync(IAttachmentCreateUploadSessionRequestBuilder builder, Stream stream, CancellationToken cancellationToken) at UiPath.MicrosoftOffice365.Extensions.FromShared.FilesExtensions.UploadAttachmentAsync(GraphServiceClient graphClient, Func
5 uploadSessionCreatorFunc,
IResource resource,
String parentId,
String address,
String attachmentName,
CancellationToken cancellationToken)
at UiPath.MicrosoftOffice365.Extensions.FromShared.GraphServiceClientExtensions.UploadAttachmentsToMessageAsync(GraphServiceClient graphClient,
String draftId,
IEnumerable1 attachments, String address, CancellationToken cancellationToken) at UiPath.MicrosoftOffice365.Extensions.FromShared.GraphServiceClientExtensions.UploadAllMessageAttachmentsAsync(GraphServiceClient graphClient, String account, String draftId, IEnumerable
1 attachments,
IEnumerable1 inlineAttachments, CancellationToken cancellationToken) at UiPath.MicrosoftOffice365.Extensions.FromShared.GraphServiceClientExtensions.CreateDraftMailMessageAsync(GraphServiceClient graphClient, String address, String[] toRecipients, String subject, String body, IResource[] attachments, String[] ccRecipients, String[] bccRecipients, String[] replyToRecipients, String fromRecipient, Boolean isBodyHtml, Importance importance, IEnumerable
1 contentIdMap,
CancellationToken cancellationToken)
at UiPath.MicrosoftOffice365.Services.GraphServiceClientProxy.SendMailAsync(SendMailRequest request,
CancellationToken cancellationToken)
at UiPath.MicrosoftOffice365.Activities.Mail.SendMail.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 UiPath.Shared.Activities.ContinuableAsyncCodeActivity.EndExecute(AsyncCodeActivityContext context,
IAsyncResult result)
at UiPath.MicrosoftOffice365.Activities.Office365BaseClientActivity.EndExecute(AsyncCodeActivityContext context,
IAsyncResult result)
at UiPath.MicrosoftOffice365.Activities.Office365ClientActivity`2.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)
Hi Anil,
That is the same issue, however solution doesn’t work unfortunately - I need to authenticate with Application ID, Tenant ID and Secret.
Which I believe is only available through the O365 activities
Just to add to this, it doesn’t seem like it’s the activity pack but the server where the process is executing
Works from my own personal PC but limited on server-side
I think the same as the attachment and email message size varies as per the office 365 licence type.
The issue can’t be related to License Type, although it might be for similar issues across Graph - the limit for email for the Organisation is 30MB and I would anticipate an error message from Graph on those instances.
As the same request works from a Personal PC, using the same authentication. (Application ID, Tenant ID and Secret).
I’ve got a feeling it’s Firewall or Antivirus Software which is terminating the connection partway through Sending the Email…
I will update once we find out the issue
There was a very simple fix for this, https://outlook.office365.com/ needs to be whitelisted on the Firewall.
It seems that the above URL is not required when file size is below 2MB but uses this URL when the attachment size is greater.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.