Login failed for user Reason: Token-based server access validation failed with an infrastructure error Login lacks Connect SQL permission.
Login failed for user ‘localhost\windows_user’. Reason: Token-based server access validation failed with an infrastructure error.
Login lacks Connect SQL permission. [CLIENT: <local machine>]
Check you have permission to the user, generally we will have permission.
Check you are able to access SSMS local & remote.
Most of the case issue will be – Check how many group has deny permission, definitely your login will be one of in the group. For our case it was built in user group.
SELECT sp.[name],sp.type_desc FROM sys.server_principals sp INNER JOIN sys.server_permissions PERM ON sp.principal_id = PERM.grantee_principal_id WHERE PERM.state_desc = 'DENY'