When trying to add the url on AppDeployment.exe, an error appears

  • 16 February 2021
  • 0 replies
  • 28 views

Userlevel 5
Badge +20
 

When trying to add the url on AppDeployment.exe, an error appears

kbt133539

PRODUCT
K2 blackpearl 4.6.11 to 4.7
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.
LEGACY/ARCHIVED CONTENT
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.

Issue

When trying to access the url on App Deployment http://{ServerName}/autodiscover/api/metadatadocument/test, an error appears.

Symptoms

When adding a URL to K2 for Sharepoint Activation it prompts the error below:

Endpoint cannot be reached : http://{ServerName}/autodiscover/api/metadatadocument/test

 

Ensure that you can browse to the endpoint from this location.

Image

Resolution

To resolve this issue, please do the following:

- A full K2 database backup must be taken before you start.

- Also ensure that you the backup web.config file for workspace site - c:Program Files (x86)K2 BlackPearlWorkspacesiteweb.config

 

Steps to repair K2 OAuth

 

1. On the SharePoint Server, run the following PowerShell scripts as SharePoint Administrator:

• Remove-SPTrustedSecurityTokenIssuer -Id "K2 for SharePoint"

• Remove-SPTrustedRootAuthority -Id "K2 for SharePoint"

 

2. Then check to see that the Providers were deleted (there should be NO K2 High Auth Certificates for K2 for SharePoint)

• Get-SPTrustedSecurityTokenIssuer

• Get-SPTrustedRootAuthority

 

3. Then on the SQL server where the K2 DB is, run the following:

• DELETE FROM [K2].[HostServer].[Configuration] WHERE VariableToken like '[[]K2_SIGN%'

• TRUNCATE TABLE [K2].[Authorization].[OAuthAppOnlyToken]

 

4. Then run the following scripts to ensure it had been removed:

• SELECT * FROM [K2].[HostServer].[Configuration] WHERE VariableToken like '[[]K2_SIGN%'

• SELECT * FROM [K2].[Authorization].[OAuthAppOnlyToken]

 

5. Next, remove the K2 Certificate from the installation folder because you will be generating a new one:

• Program Files (x86)K2 blackpearlHost ServerBinOAuthCertificates

 

6. Run a K2 BlackPearl Reconfigure from installation Media (This is where you installed K2 Blackpearl from originally, remember to make a backup of the workspace config file.)

 

7. Check to see if a new Token and certificates were generated.

• Program Files (x86)K2 blackpearlHost ServerBinOAuthCertificates

• SELECT * FROM [K2].[HostServer].[Configuration] WHERE VariableToken like '[[]K2_SIGN%'

• SELECT * FROM [K2].[Authorization].[OAuthAppOnlyToken]

 

8. On the SharePoint Server as Farm Administrator, Run the AppDeployment.exe (remember that the user you run it as, has to have rights on the K2 DB to be able to retrieve the certificate).

 

Next, Run the AppDeployment.exe to added the K2 For Sharepoint application. After adding in the URL of K2 the issue should be resolved and K2 for SharePoint will be added as expected.


0 replies

Be the first to reply!

Reply