Logon failure: the user has not been granted the requested logon type at this computer

Krishna Priya Cherungottil 20 Reputation points
2023-08-08T10:33:07.5166667+00:00

I have added a user with Admin privilege in my machine. I have a console application which tries for windows authentication. I am trying this in 2 ways one with ADVAPI's LogonUser and other with PrincipalContext's ValidateCredentials method. But both are returning Logon failure: the user has not been granted the requested logon type at this computer error. what can be the reason? please suggest. TIA

Developer technologies | C#
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.