Known Issue: K2 for SharePoint 500 Internal Server Error (B2B)
Issue
You may experience a 500 Internal Server Error when using SharePoint Online with K2 Cloud. This may happen when setting up your K2 for SharePoint environment, when using an Azure App proxy, or when appifing a list or library while using an Azure business-to-business (B2B) invited account.
Error Message
HTTP/1.1 500 Internal Server Error
Cause
Trust authentication redirects back to SharePoint using the return URL or referrer URL. Microsoft enabled an HTTP header, causing a breaking change that only returned the Tenant domain URL as the referrer instead of the full URL.
Resolution
You must update your K2 for SharePoint App to fix this issue. You can follow these high-level steps to update the K2 for SharePoint App in the app catalog. For more information and specific steps to deploy the app, see the product documentation for K2 for SharePoint.
This fix is only for customers using an Azure Business to Business invited account.
- Download the updated App from the download link. If you need the K2 for SharePoint App for K2 Five (5.4), go to KB003636.
- Add the updated K2 for SharePoint App on your App Catalog Site using the Apps for SharePoint list. If there is an existing K2 for SharePoint App in the app catalog, you must replace the existing version with the new version, do not delete the existing version of the app. You grant K2 for SharePoint permissions during this step, and it requires Global Admin (Tenant) permissions, so you must be a Global Admin.
- Add the K2 for SharePoint app to your app catalog. You grant K2 for SharePoint permissions during this step, and it requires Global Admin (Tenant) permissions, so you must be a Global Admin.
- On the Site Contents page of the app catalog, click the upgrade link for K2 for SharePoint App. (If you do not see the link, go into the Details page for the app to upgrade it).
- Click the K2 for SharePoint app from the Site Contents page or Quick Launch menu of the app catalog site, and run through the Registration Wizard by clicking the Registration Wizard link in the Administration section to register the app with your K2 environment's URL. (If you do not see the Registration wizard, make sure you are on the app catalog). If you see the error message "A newer version of the K2 for SharePoint App is available" during this step, see Troubleshooting K2 for SharePoint Integration to resolve the error.
- Deploy the app to one or more site collections using the Manage App Deployments page in SharePoint. A link to this page is provided on the K2 for SharePoint settings page. It is recommended you do this by paths rather than individual URLs, but individual URLs give you more control regarding which site collections have K2 integration. You should deploy as a SharePoint Administrator if you are deploying to multiple site collections.
- Activate the app to every site collection using the Manage App Activations page. A link to this page is provided on the K2 for SharePoint settings page. This page activates to every subsite in the site collection, so point it to the root site of the site collection. You need Site Collection Administrator permissions on each site collection you're activating, and you can activate from the app catalog or from each site collection individually as long as you have the permissions.
- Start using K2 for SharePoint to modify existing solutions or create new ones.