0

In my SharePoint farm, I have form based authentication enabled as well as Windows authentication. All works fine, but in some scenario, when I login, and hit the logout and try to login again at some intermittent time it gives an error for chrome browser for whole site as below.

So when I close the browser, I could open the site and login again without any issues.

enter image description here

Note: this error only appears for domain users. It doesn't occur for users which are registered inside database.

By checking the ULS logs, below is the details I am getting:

The value is neither a claim user name nor a claim user name suffix

System.InvalidOperationException: Operation is not valid due to the current state of the object. at Microsoft.SharePoint.Administration.Claims.SPClaimUserKeyUtility.GetUserKeyString(String value) at Microsoft.SharePoint.Utilities.SPUtility.GetFullUserKeyFromLoginName(String userNameSuffix) at Microsoft.SharePoint.ApplicationRuntime.SPHeaderManager.AddIsapiHeaders(HttpContext context, String encodedUrl, NameValueCollection headers) at Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.PreRequestExecuteAppHandler(Object oSender, EventArgs ea) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

I have not found any relevant solution yet. Can someone help, if encountered such issue before.

Thanks in advance.

1

I had the same issue today on a site with Kerberos authentication. It started after I extended the web app using Powershell. I saw the same errors in ULS logs as you mentioned. For some reason the authentication mode for this web app changed from Kerberos to NTLM and the web app got converted to Classic mode. I converted it back to Claims mode and enabled kerberos and its back up. The ULS error 'Neither a claims user nor a claims user suffix' suggested something was wrong with claims mode. Checked it by running this command and the output was false: $WebAppName = "http://" $wa = get-SPWebApplication $WebAppName $wa.UseClaimsAuthentication false Converted back to claims mode using this command: Convert-SPWebApplication -Identity yourWebAppUrl -To Claims -RetainPermissions [ -Force] Please check your web application's authentication provider settings. Reference: https://technet.microsoft.com/en-us/library/gg251985.aspx

  • UserClaimsAuthentication is already set to true for this site collection. – Pradip R. Mar 13 '18 at 6:04
  • Please check authentication settings in IIS for that site. Also if the issue happens intermittently just on chrome, I would test it in Chrome 'Incognito mode' and see if it is reproducible there. If not, then it will be some chrome extension causing the problem. – AshMSport Mar 19 '18 at 13:16
1

Finally found a solution to this problem.

It was happening for me only in Chrome, once logged out for several times in a row it seems to lose the ability to translate windows credentials to claims.

Anyway, the solution is

  • Go to Central Admin > Web Application > Authentication Providers
  • The "Enable Windows Authentication" should be TICKED, but UNTICK the "Integrated Windows authentication" and it all starts working as intended, no issues with the forms or windows logins.

Works on my SharePoint 2019.

  • Thank you for your answer! This seems quite positive solution and I hope it works for me when I check. Will share an update, thank you! – Pradip R. May 14 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.