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.
When you run the Registration wizard from the K2 for SharePoint app on the App Catalog, it will fail and the following error appears:
"Unable to retrieve realm for SharePoint site: [SP Site URL]"
The SharePoint site URL you see in your error is the URL for a site that no longer exists.
- This behavior does not show on all K2 Environments.
- You have been able to run the registration wizard in the past on this environment.
- Confirmed that if you take the URL from the error and attempt to hit it in your browser, you are unable to hit an active SharePoint site.
- When viewing the list of group Providers in the K2 Management site you see one or more group providers tring back to Sharepoint sites that have been deleted:
This error can be due to the fact that we still have group providers in K2 that are tied to nonexistent SharePoint sites. Our registration wizard needs to reach out to these sites and in doing so if it can not find it in SharePoint we then hit our error. If a group provider exists for the URL in our error and is identified as no longer in use (e.g. groups tied to that site are not used in K2), then we can safely delete these via the K2 Management site.
See section "Removing a Group Provider":
If you are unsure whether or not a group provider is in use, take a Backup of the K2 database before deleting them from K2 Management for rollback purposes.
After cleaning up the group provider tied to the error you can then attempt to run the registration wizard again. This time you should no longer get the error for "unable to retrieve realm".
Removing K2 from a SharePoint site or deleting the site will not remove the group provider as K2 does not know if this group provider is still in use. This is by design and the group providers should be cleaned up manually once we are certain groups from these sites are no longer used within K2.