When I enter ‘Set Var: EmailList’ in Office365Message Result, I am getting the below error:
Hi Jianguo,
In my case, I used the variable type named Uipath.MicrosoftOffice365.Modals.Office365Message when I get the emails from the share mailbox with this activity.
For example:
-
Variable Type:
-
Structure:
Have a great day!
Please let me know if you need anything else.
Because you wrote Uipath.MicrosoftOffice365.Modals.Office365Message you should put array then you write Uipath.MicrosoftOffice365.Modals.Office365Message.
For example:
-
Select the array option:
-
Select browse for types:
-
Type Uipath.MicrosoftOffice365.Mo and select the option named Office365Message
-
Click Ok Button
Hi Pamela, thank you so much for the detailed explanation. I am new to UiPath, and I am trying to convert Exchange Mail activities using basic Auth to MS O365 activities using OAuth2 modern authentication to support Microsoft’s mandate to permanently disable basic auth
Gladly!
Have a great day!
Any questions you have do not hesitate to ask.
Welcome to the world of automation!
Thanks Pamela! I appreciate your encouraging words as I started my learning path of UiPath. Do you have any examples/docs on how to consume the “Get Message” output/result array, especially on handling the attachments?
Of course.
In my case, I used a for each with the type argument named Uipath.MicrosoftOffice365.Modals.Office365Message then each email saves the attachments to a local folder to use another for each to work them.
For example:
-
For each to loop through emails:
-
Save attachments:
-
For each to loop through files:
Thanks Pamela. This gives me enough to digest for now.
Have a great day!
Hi Pamela,
Sorry to bug you again, do you have an example for sending emails using MS O365 activity? Does this look right?
Hi Jianguo,
I see it well, because in my case I use forward, but It’s similar to this.
Thanks again Pamela. I am now getting the below error when I run the process to send email. Within the same O365 Scope, I am able to get mail. Is it the issue with Graph API permissions?
Message: Code: BadRequest
Message: /me request is only valid with delegated authentication flow.
Inner error:
AdditionalData:
date: 2022-11-04T13:57:02
request-id: c6a42995-11d9-4f97-9e18-1450c24b60fe
client-request-id: c6a42995-11d9-4f97-9e18-1450c24b60fe
ClientRequestId: c6a42995-11d9-4f97-9e18-1450c24b60fe
Did you write the account?
Could you provide me with the configuration of the properties?
The configuration is correct, according to the issue is the permission with the azure authentication.
First you need to understand the delegated permissions and application permissions .
Delegated permissions are used by those application which require user interaction or signed in by user whereas application permissions do not require any user interaction and used by those applications which run in the background and consented by admin only beforehand.
Finally, you need to provide the access according to this function (send email)
Thanks Pamela. I was guessing it’s a authentication/permission issue. We would need application permission since we are running unattended robots. I will check with our Info Sec team who registered our app in Azure and report back on the outcome
In my case I used this permission below:
Because you can use a share mailbox or a personal account, you only have access for a personal account.
Thanks Pamela, I got the exact same error message when I tried with a personal account. In my case, I do need application permission as we are running unattended robots.
Hi @Bearcats96 - If you are still facing the issue, provide the From address same as Account. That should skip the /me valid for delegate workflow error. I think From and Account field are mandatory when you use App ID and Secret for Send Mail activity. For other activities, add/remove this From value and try if you are facing the same error.