The Salesforce broker cannot be registered due to the following error:
The error appears as follows:
"Error","SourceCode.SmartObjects.ServiceBroker [ExecuteSmartObject]","10702 An error occurred in the K2_Management Service Instance. System.Exception: OAuth token requires authorization.
Callback URL: https://login.salesforce.com/services/oauth2/authorize
This issue has been corrected in K2 Cloud Update 3, the token is not authorized and the registration is giving the end user the authorization URL.
Please note that Full HostServer logging will need to be enabled to expose the full URL.
Workaround 1 (Construct your URL by replacing the parameters values):
- Resource ID
By trying the below URL and allowing the App to configure the Salesforce "Feature" you will be successfully authenticated.
Execute the Callback URL: https://login.salesforce.com/services/oauth2/authorize?
Salesforce documentation on the OAuth flow and the usage of the "Authorize" endpoint: https://help.salesforce.com/articleView?id=remoteaccess_oauth_web_server_flow.htm&type=5 https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_web_server_oauth_flow.htm