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 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":
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".