Symptoms
Customer is receiving the error "SharePointRoleProvider.GetGroups: System.Reflection.TargetInvocationException: An unexpected failure was encountered when contacting SharePoint to get information from the group provider Root: K2 Server does not have the necessary permissions on the SharePoint server or cannot authenticate with the server. ---> System.Net.WebException: The request failed with HTTP status 401: Unauthorized." in the HostServer logs.
Diagnoses
Issue stemming from either an invalid URL in the for the Group Provider, or insufficient permissions for the administrator.
Resolution
Please check the Hostserver.GroupProvider table in the K2 database and locate the Root group provider. Please verify that the URL in this table is valid, and that the K2 Service Account has Site Collection Administrator permissions on the site. The customer granted Site collection administrator permission on the site, and the error was resolved.