OAuth2 support for O365 with Application permissions (C# .NET)

+1
I have finally made it to the point where I am getting an access token and thought I was past the worst of it, but now I find myself in the same predicament as you. With the retirement of basic auth for Office 365 eminent this week, I am thinking I might have to switch over to the Exchange Service. I’ll let you know if I have any luck.

Aspose.Email version 20.9.1.0 seems to have resolved this issue.
Set the oAuthNetworkCredential.UserName to the e-mail account you wish to impersonate before calling getEWSClient and it will sucessfully return a client. It is worth noting that this had no effect in prior versions of Aspose.EMail.

@dlankford

I hope the latest version will work as expected on your end.

Yes, thank you. The new version works very well.

@dlankford

Thank you for sharing the positive feedback.

I have the exact use case as the topic starter but within Java instead of .NET. The topic says that it only works from version 20.9.1.0 from the Aspose.Email library. I’m using 20.9 in Java and I still have the same problems as in .NET prior to version 20.9.1.0. There isn’t a Java version for this.

Can the solution used in 20.9.1.0 for .NET also be implemented in Java?

@bascouwenberg

We will get back to you with feedback regarding Java based implementation for the same after discussion with team.

@bascouwenberg

We are going to implement and provide this support for Aspose.Email for Java from upcoming 20.10 version and will share feedback with you as soon as it will be available online.