Microsoft is disabling basic authentication from October 1st so we have to move all exchange ews email activity to Auth 2.0.
Does anyone has any idea how to do? or what all is required to convert Exchange email to Auth 2.0?
There is authentication type called : “Interactive” which is 2.0 but when using this, there is a pop-up in the robot one time asking for username and password. We are not able to know if this is due to some setting in the UiPath or due to admin related username privilege’s issue.
Has anyone used Mail Exchange Send/Get for unattended robots for Auth 2.0? If yes can you please let me know what steps to be taken from uipath or IT admin for the privilege’s.
We are facing the same challenge with implementing modern authentication in our old exchange mail activities using basic auth. Would you mind sharing a little more details on how you switch to O365 activities.
Create new Azure App (for access to O365 outlook mail activities using Graph API) with Client Secret and below 2 Graph API permissions;
a. Mail.ReadWrite (with Type=Application). (Graph API)
b. Mail.Send (with Type=Application). (Graph API)
The newly created Azure App’s access should be restricted only to the required emails; otherwise with whichever email address bot can send the email.
Take the below for the newly created Azure App;
a. Application (Client) Id.
b. Application (Client) Secret.
c. Directory (Tenant) Id.
downloaded UiPath.MicrosoftOffice365.Activities and used its mail activities in place of exchange mail. Utilize the Tenant Id, Application Id from the above in the Microsoft Scope.
In exchange activity if you use the authentication type as ‘UserNameAndPassword’ it falls into basic authentication.
You can use Interactive type which is oAuth 2.0 but in our case the first time we used this, it asked for username and password to enter manually while running the bot. Ans also Interactive token is recommended for Attended Automation as per UiPath.
And ours is all unattended automation so we decided to switch to Microsoft activities.
Using O365 activities, only with these 2 details can we be able to use ?
a. Application (Client) Id.
b. Directory (Tenant) Id.
i.e. without using client secret key
I got my app registered in Azure and received app id, tenant ID, and client secret. I am now able to read email using “Get Mail” activity. However when I try to send email using “Send Mail” activity, I got the following error:
Send Mail: Code: BadRequest
Message: /me request is only valid with delegated authentication flow.
Inner error:
AdditionalData:
date: 2022-11-05T22:13:13
request-id: 06b3ec66-f0b5-44c6-ae29-58553351f1cc
client-request-id: 06b3ec66-f0b5-44c6-ae29-58553351f1cc
ClientRequestId: 06b3ec66-f0b5-44c6-ae29-58553351f1cc