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

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,409 questions
{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.