No windows identity for account

When you have a Sharepoint environment with Windows authentication but you change to Claims Based Authentication you might have this error all over on the ULS Logs.

How to fix them, you need to migrate the users, please note that this script needs to be executed on all web apps changed or migrated

$wa = Get-SPWebApplication http://mywebapp
$wa.MigrateUsers($true)

When this is executed you might find errors like these on the logs:

09/07/2017 13:59:53.23 powershell_ise.exe (0x6198) 0x2EB0 SharePoint Foundation Claims Authentication af32m Unexpected Could not convert user with with sid 'S-1-5-21-1471047708-1026687513-316617838-19564'. 01cc5c40-f800-0000-1bf6-46a8b6f7d201

If you want to know which user is this, execute the following:

Get-SPUser -Web "https://yourwebapp/ "|Where{$_.Sid -eq "S-1-5-21-1471047708-1026687513-316617838-19564"}  

You will get the login name, which in my case was a disabled account, so I removed it from everywhere in the farm.