Skip to main content
Nintex Community Menu Bar

OAuth Exchange troubleshooting guide

  • February 15, 2022
  • 0 replies
  • 656 views
  • Translate

Gareth
Nintex Employee
Forum|alt.badge.img+3

Topic

 

In this topic we will provide a troubleshooting guide on how to identify and resolve Exchange related problems you might face within the K2 product.

 

This guide does not cover all possible errors, but it will try to cover the most common issues faced by users.

 

In September 2019, Microsoft announced plans to turn off Basic Authentication for Exchange Web Services (EWS) for Exchange Online. An article released on the 1st of September 2022 announced that Microsoft will start to turn off basic auth for specific protocols in Exchange Online from the 1st of October 2022.

 

In line with these changes from Microsoft, we highly recommend that you read through this article and make the necessary changes to your environment before reading through the examples below.

 

Example

 

Error #1

 

When actioning a workflow, you may notice your workflow email events fail to send. When reviewing the K2 Hostserver log files, you might see a generic error like this:

 

SourceCode.Workflow.Shapes.EWS: Autodiscover Failure: The Exchange server is not available, the password is incorrect or the e-mail address [email address] does not exist.

 

 

To determine the actual error, review the K2 Hostserver log files you found the above error, and look a few lines above it, you will likely find the real error. On newer versions of K2 Five (5.4 and onwards) the actual error is logged before the generic one.

 

Note: Within K2 Five you can disable the Autodiscover functionality, then it will not log the generic AutoDiscover error message. When there is an error, and the Autodiscover functionality is enabled, then it tries to Autodiscover, however that usually fails as well and a generic error message is logged.

 

For example, this can likely be the actual error above the generic one:

 

 

"Error","General","0","ErrorMessage","SourceCode.Workflow.Shapes.EWS ServiceRequestError: Workflow= '[Workflow Name]', PID= '2473', Event= 'Send Email', Activity= 'Send Email'","0 The request failed. The underlying connection was closed: An unexpected error occurred on a send."

 

 

 

When you see an error like this, its recommended to confirm you have the Minimum Requirements for the Transport Layer Security (TLS) 1.2 configured on your environment.

 

Once you have made those changes, restart your K2 Server and the error should disappear and you should be able to continue to use Exchange within the K2 Product.

 

Error #2

 

When activating the Exchange Online feature, you might experience the following error:

 

 

Something went wrong K2TSTS20002: An error occured while processing an authorization response (invalid_redirect_uri) The given realm has one ore more invalid redirect URIs. (http 500 error) Correlation Id: [Correlation Id]

 

 

 

26827i517487AAC4B3A25F.png

 

How do you resolve this problem?

If you face this issue, please contact Nintex Support, and provide the following to the support engineer:

 

 

 

Error #3

 

When switching from Basic authentication to OAuth authentication for Exchange Web Services (EWS) for Exchange Online, after you have configured it as per this article, you may see the following error in your K2 Hostserver log files:

 

 

 

"62763157","2022-09-22 12:59:01","Error","MessageBus","61012","ConnectionError","ExchangeWebServicesOrigin","61012 Exception from message source [emailAddress]: System.ArgumentNullException: Value cannot be null. Parameter name: token Server stack trace: at Microsoft.Exchange.WebServices.Data.EwsUtilities.ValidateParam(Object param, String paramName) at Microsoft.Exchange.WebServices.Data.OAuthCredentials..ctor(String token, Boolean verbatim) at SourceCode.MessageBus.Ews.ExchangeWebServicesConnectionStringBuilder.ExchangeServiceFactory(ITokenFactory tokenFactory) at SourceCode.MessageBus.Ews.ExchangeAutodiscover.Autodiscover(String emailAddress, ExchangeWebServicesConnectionStringBuilder builder) at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

 

 

 

To resolve this, your OAuth Resource value in the ConnectionStringEditor.exe tool needs to be the same as the Resource Name value within K2 Management. The OAuth Resource property value is the OAuth Resource Name for your Exchange Online integration. 

 

26830i116A56C62CADC8E7.png

 

26829i0936F195BCA408DC.png

 

Additional Resources

 

 

Did this topic help you find an answer to your question?

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings