This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice This article is not considered official documentation for K2 software and is provided "as is" with no warranties.

Issue

When running the registration wizard it fails on the SharePoint service broker step:
"An error occurred trying to process the request invalid_redirect_uri) Cannot complete the registration wizard."

Symptoms

When running the registration and confirming the O365 popup for K2 trust, the SharePoint service Broker step displays an error.
The following errors appeared in the logs:
"onmicrosoft.com': OAuth token requires authorization Microsoft.SharePoint.Client.ServerUnauthorizedAccessException: Access denied."

 Initially we thought Oauth was the issue. We tried recreating the Oauth token trust for K2 with the SmartObject tester tool.

Resolution

This cause of the issue was found by comparing the setups between the production and testing environments.

Production was setup with Kerberos. When changing the testing environment to the same settings through the setup manager, allowed the SharePoint registration to run successfully.