cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
243
Views
2
Helpful
2
Replies

ECE 12.6 - OAuth with Graph APIs - Microsoft retiring Outlook REST API

piyush aghera
Spotlight
Spotlight

Hi Community,

Recently we hit an issue where our ECE 12.6 with ES8 and integrated with PCCE 12.6(2) suddenly stopped sending emails using OAuth accounts. We started to see in DX logs that the authentication token has expired. So we renewed tokens for all Service Accounts which had delegation privileges on underlying ECE emails. Generally this will solve the issue, but we continue to see logs about expired token and emails didnot get dispatched. While going thru the logs, we noticed something different though; we saw below logs:

<@> ERROR <@> [76:DxInstance id : xxxx] <@> ProcessId:xxxx <@> PID:1 <@> UID:12 <@> UserSessionId: <@> ClientIP: <@> com.egain.mail.module.email.impl.oauth.office365.AuthHelper <@> handleErrorScenarios() <@> Error response code received for url, responseBody 410 https://outlook.office.com/api/v2.0/me {"error":{"code":"Gone","message":"The API version 'V2' has been deprecated."}} <@>

Notice the part in bold text. This was something new. So we started looking around and quickly found an article from Microsoft that announced that Outlook REST APIs will be decommissioned starting 31st March 2024. Below is the article:

https://devblogs.microsoft.com/microsoft365dev/outlook-rest-api-v2-0-and-beta-endpoints-decommissioning-update/#:~:text=not%20affect%20Outlook%20add%2Dins

Further digging down with Microsoft confirmed about this article and Microsoft advised us to move from Outlook REST APIs to Graph APIs. Then next turn was to go to Cisco and TAC was informed enough to let us know that this issue or modification is addressed in ECE 12.6 ES9 patch. Now the irony is that we recently upgraded ECE to 12.6 couple of months back with eGain supporting us on every step, and they advised us to install ES8, whereas they should have advised us to install ES9 to cover above modification from Outlook REST API to Graph API. Anyhow, we were able to install ES9 and get the authentication up and running and dispatcher started to send emails when we turned on the dispatcher after queuing all outbound emails for the entire day.

Installation of ES9 is very straightforward, however there are couple of steps needed after the installation which are not documented in Readme file or anywhere else. We had to fiddle around and figure out those settings, which I want to highlight here for everyone's awareness. Maybe some of you may already have gone thru this pain.

1. After installing ES9, login to ECE using your partition admin account. Then navigate to your respective Department-> Email -> Accounts -> select the Account. Then under Server Type, change from "IMAP and SMTP" / "POP3 and SMTP" to "Graph API". That will generate a message to regenerate token.

2. So next we regenerate the Authorization Code. Click on Regenerate and login using your respective service account or individual email account. Click Save. If you have less than 50 email address added to this OAuth account then you can click on Test connection and see if it comes out successful.

3. Restart Dispatcher Instance.

If everything is goes well, then you will see your Dispatcher will start sending emails using Graph APIs. How do you confirm if dispatcher is using Graph APIs? You'd see something like below in DX logs:

 <@> INFO <@> [193:DxInstance id : xxxx] <@> ProcessId:xxxx <@> PID:1 <@> UID:12 <@> UserSessionId: <@> ClientIP: <@> com.egain.mail.module.email.GraphMailConnection <@> buildGraphClient() <@> Building graphServiceClient! <@>
 <@> INFO <@> [193:DxInstance id : xxx] <@> ProcessId:xxxx <@> PID:1 <@> UID:12 <@> UserSessionId: <@> ClientIP: <@> com.egain.mail.module.email.GraphMailConnection <@> buildGraphClient() <@> graphServiceClient built successfully! <@>

I hope this will help someone in their pursuit of this forced change from Microsoft.

If you find this article helpful, please do give thumbs up. If you have any question, do drop a reply and I'll be happy to share more info on this.

2 Replies 2

Very nice of you to put this in for others in similar situation to know how to deal with this. However it would be recommended that you put this into a document instead of posting it as a question as that would make it much easier to find moving forward.



Response Signature


Thanks Roger. Moved it to Knowledge Base article.