Problem
When you activate the Exchange Online feature instance in K2 Management, an error occurs on the OAuth Token step:
Something went wrongK2TSTS20002: An error occured while processing an authorization response (invalid_redirect_uri)The given realm has one ore more invalid redirect URIs.(http 500 error)
Solution
1. In K2 Management, go to Authentication - Claims - Realms.2. Click on each Realm and check whether there are any HTTP urls configured as an audience for the realm that are no longer in use.3. If so, select the audience with the HTTP url and remove it. (I would suggest taking a screenshot of the existing configuration first).4. Go to Authentication - OAuth - Resources. If a resource for Exchange Online exists, delete the resource because a new one will be generated when you create a new feature instance.5. Create the Exchange Online feature instance again.
See following documentation on Realms and Audiences: https://help.nintex.com/en-US/k2five/userguide/current/default.htm#K2-Management-Site/Authentication/Realms.htm