Question

Hi All, Need some help on replacing basic authentication with OAuth standard (modern authentication) to connect to EWS (Exchange Web Services) in A360

  • 8 September 2022
  • 29 replies
  • 54 views

In code, We are using one outlook account (ex: ssc-ppp-ttdd@companyname.com) to send emails for stakeholders after completion of bot execution at the end(Summary report).This basic auth will deprecate from OCt1. Our current codes will get affected. Now we need to replace with modern auth. Could you please let me know the steps /ways to achieve in A360.Looking for the inputs.

 

Additional Info: We have client id and Tenant ID..Not sure whether any other details required to use in A360.Looking for the steps to implement in code


29 replies

Userlevel 3
Badge +7

Hi @Hemalatha Barla​ ,

 

Below details are required to connect the server using OAuth

 

 

  • EWS Client ID and Tenant ID: Enter the unique client and tenant IDs generated when you registered the application in the Microsoft Azure portal.
  • Username: Enter the username that you want to use to access the mail server.

For example, john.smith@myCompanyName.com

Choose the username as Credential or String.

Password: Enter the password for the username you provided.

Choose the password as Credential or String

 

 

How to connect EWS mail server with Automation Anywhere ...

 

Hi Tamil Arasu,

Thanks for the response.

 

I have couple of questions. It would be great if you can help me here whether my understanding is correct or not.. As this is first time i am doing it.

 

I have username and Password of the mail box, Client ID, Tenant ID (got from Azure portal) and i will pass in code.. Will it generate any token after providing these details in AAcode? If yes, how the output will be look like. To test these do we need to create any API or O365 team will provide any API?

 

I have seen this link but not sure on Request URI where to give in the code. Is it really necessary to provide request URI

Also could you please let me know in Oauth do we need to provide username and password in code.. Sorry if this is a dumb question but wanted to clarify before implementing.

 

Do you have any sample code and response to replace basic auth with modern auth to connect EWS. if yes, please provide that.

 

I have read in one article this OAuth will support only in A360.25?i s it true?

 

Looking for your inputs

 

 

 

Userlevel 3
Badge +7

I have read in one article this OAuth will support only in A360.25?i s it true?

 

Can you please share that link here?

Hi Tamil Arasu,

 

Can you share some sample code how we can achieve using Client ID,tenant ID. to replace basic auth with modern auth to connect EWS.

Userlevel 3
Badge +7

How to connect EWS mail server with Automation Anywhere ...

 

Please check out the above link, the same way you have to connect to the server.

Userlevel 3
Badge +7

To authoritze connection, enter credential or insecure string for client ID and tenant ID (variables are not supported). The connection will open in default browser tab. After successful connection you can close the browser tab and return here. EWS permission is required only once for an Azure client registration.

 

 

 

Hi Can anyone help me on my above queries. Looking for the help.

In this link it is saying Request URI. Could you plesae let me know hw will get that URI and use in code

https://apeople.automationanywhere.com/s/article/Basic-Authentication-deprecation-in-Microsoft-Exchange-online

Userlevel 3
Badge +7

Are you able to see the below options in your AA Email Package-->Connect Actionimage

Hi Tamil Arasu,

 

I can see the below options in AA but not sure whether it will work or not.

What is your A360 version?

imageimageimage

Userlevel 3
Badge +7

How to connect EWS mail server with Automation Anywhere ...

 

Please check the link, here explained the same case

Hi Tamil Arasu,

 

Which version you are working on? Also once i connected with Ews server after that i need to send email to other business accounts(send action)also will work as expected

Userlevel 3
Badge +7

Automation 360 v.25 release.

 

You can also reach out to the Automation Anywhere Support team to fix this issue.

Hi Tamil Arasu,

I followed the same link which you gave.

 

Tried to replace basic auth with modern auth(OAuth) in below code..looks like OAuth it is not getting authenticated after passing all the details like username ,pwd,tenant id and client id getting this below page. Refer screenshot1

 

Screenshot1:

 

image 

 

image 

 

Userlevel 3
Badge +7

This issue usually happens when you use different accounts to sign in Office portal in the same browser. This is because the browser caches your account credential in one session.

 

Userlevel 3
Badge +7

please enter username and pwd manually to authenticate for 1st time.

@Tamil Arasu​ 

 

So you want me to remove cache in my machine and try. Will that work?

 

Also noticed when i click authorize it is navigating to first screenshot1 so every time do i need to enter username and pwd manually to authenticate.

 

Or what will happen next if we receive screenshot1.can you tell me the procedure

 

Hi Tamil Arasu/All

Anyone is using A360.18 or below A360.25 version in Automation Anywhere.

If yes, could you please let me know how you are using OAuth in Email action command.

 

I have reached out to support team and they are saying to upgrade it to A360.25 which is not possible for us to upgrade immediately(it take some time) . We need some alternative solution.

Hi Tamil Arasu,

 

i am able to authorize using Email connect Action. But every time we need to select the account as like attached screenshot manually??

 

imagealso later i used send action but bot is not sending an email to my email id.

 

image 

Could you please let me know how you are sending email with OAuth in A360.

can you share the steps of how you are sending an email with OAuth.

Userlevel 3
Badge +7

Clear the Windows credentials. To perform this, please go to Control Panel > credential manager > Windows credential > remove Office 365 related accounts. 3. Restart your computer and re-open an Office application and sign in with the proper Office 365 account

Userlevel 3
Badge +7

To authoritze connection, enter credential or insecure string for client ID and tenant ID (variables are not supported). The connection will open in default browser tab. After successful connection you can close the browser tab and return here. EWS permission is required only once for an Azure client registration

No i didnt upgrade because it takes some time to get approvals to upgrade.

 

As support team mentioned A360.18 also will work .So wanted to see difference between them.

If you can provide some screenshot removing sensitive data it will be helpful.

 

Userlevel 3
Badge +7

No need for DLL. Did you try to upgrade the package version only?

Reply