This is an addition to steps in the following KB: https://help.k2.com/kb001632
Before You Begin
After performing the steps in the KB: https://help.k2.com/kb001632, you may still get the following error when using the Registration Wizard under "SharePoint Service Broker:"
"SmartObject Server Exception: Error refreshing Service Instance '[SP Service Instance Name]'. Service returned : 'The remote server returned an error: (401) Unauthorized.Failed to initialize the Context: URL: [SP Site URL]"
To resolve the issue complete these steps:
- Stop the K2 Service
- Run the following SQL query:
TRUNCATE TABLE [K2].[Authorization].[OAuthAppOnlyToken]
- Restart the K2 Service
- Rerun the Registration Wizard.