How do I fix logon failure the user has not granted the requested logon type at this computer?

I have created an ASP.Net application which impersonates the user in order to create an AD group, and then launches a powershell process as the user (separately from the impersonation).

For some reason the group creation works fine and shows as success in the Event Viewer, but when it tries to run the PowerShell script, I get the following error:

The user has not been granted the requested logon type at this machine.

The following is the code I am using which is failing:

SecureString securePassword = new SecureString(); foreach (char c in model.AdminPassword) { securePassword.AppendChar(c); } PSCredential psCredential = new PSCredential("CONTOSO\\" + User.Identity.Name, securePassword); ProcessStartInfo info = new ProcessStartInfo("c:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe", "c:\\PowershellScripts\\EnableDL.ps1 -dlName '" + model.Name + "'"); info.UseShellExecute = false; info.RedirectStandardOutput = true; info.RedirectStandardError = true; info.RedirectStandardInput = true; info.CreateNoWindow = true; info.Domain = "CONTOSO.COM"; info.UserName = User.Identity.Name; info.Password = securePassword;

Is there any way to bypass this error? I would rather not fiddle with the security policy on the server ideally, and this application needs to be used by around 30+ users.

Question

Issue: How to fix server error „Logon failure: The user has not been granted the requested logon type at this computer“ on Windows?

6.Hello all. When I try to connect a different user to make some simulations, I get the error saying „Logon failure: The user has not been granted the requested logon type at this computer.“ What can I do to fix that?

Solved Answer

Few people contacted us with a question how to solve the „Logon failure: The user has not been granted the requested logon type at this computer“ error on Windows 10. Therefore, we have conducted a research and found out that this problem is long-lasting, but no fixes have been provided since 2010. People encounter this error when trying to access NAS, domain or HomeGroup.

„Logon failure: The user has not been granted the requested logon type at this computer“ error pop-up

The culprit of the „Logon failure: The user has not been granted the requested logon type at this computer“ is related to the user‘s privileges that may not be configured properly. According to Windows experts, the problem happes when the user does not hape privileges to run JAMS Jobs. Besides, sometimes the issue may be resolved by simply turning on the File and Printer Sharing and turning off Password Protected Sharing on the machine that cannot be connected successfully.For this purpose, you should:

1. Open Windows search and type Sharing.
2. Select HomeGroup option from the search results and click the Change advanced sharing settings link.

Instructions 1

3. Locate File and printing sharing section and check the Turn on file and printing sharing box.
4. Then scroll down and expand All networks section.
5. Find the Password protected sharing section and check the Turn off password protected sharing box.

Instructions 2

6. Finally, click Save changes button.

If these steps did not help, please try the following „Logon failure: The user has not been granted the requested logon type at this computer“ error fixes:

Grant Log on as a batch job rights on Windows 10

Fix it now! Fix it now!

To repair damaged system, you have to purchase the licensed version of Reimage Reimage.

NOTE: the following instructions can only be applied on PCs running Windows Pro, Enterprise, and Education editions.

1. Press Windows key + R, type secpol.msc, and hit Enter.
2. When Local Security Policy window opens, click Security Settings.
3. Open Local Policies and select User Rights Assignment.

Instructions 3

4. Locate the Allow log on locally option on the right pane and click it.
5. Now open Local Security Setting tab and click Add User or Group button.
6. Enter the name of the user who encounter the „Logon failure: The user has not been granted the requested logon type at this computer“ error and click Apply > OK to save the changes.

Instructions 4

7. After that, make sure that the affected user is not included in the list of Local Security Setting properties. To check that, open Security Settings on the Local Security Policy panel.
8. Open Local Policies and click User Rights Assignment. If the user occurs on the list, exclude it and then close Local Security Policy.
9. Finally, reboot the system to save the changes.

Repair your Errors automatically

ugetfix.com team is trying to do its best to help users find the best solutions for eliminating their errors. If you don't want to struggle with manual repair techniques, please use the automatic software. All recommended products have been tested and approved by our professionals. Tools that you can use to fix your error are listed bellow:

do it now!

Download Fix
  Happiness
Guarantee

do it now!

Download Fix
  Happiness
Guarantee

Compatible with Microsoft Windows Compatible with OS X

Still having problems?
If you failed to fix your error using Reimage, reach our support team for help. Please, let us know all details that you think we should know about your problem.

Reimage - a patented specialized Windows repair program. It will diagnose your damaged PC. It will scan all System Files, DLLs and Registry Keys that have been damaged by security threats.Reimage - a patented specialized Mac OS X repair program. It will diagnose your damaged computer. It will scan all System Files and Registry Keys that have been damaged by security threats.
This patented repair process uses a database of 25 million components that can replace any damaged or missing file on user's computer.
To repair damaged system, you have to purchase the licensed version of Reimage malware removal tool.

Press mentions on Reimage

Private Internet Access is a VPN that can prevent your Internet Service Provider, the government, and third-parties from tracking your online and allow you to stay completely anonymous. The software provides dedicated servers for torrenting and streaming, ensuring optimal performance and not slowing you down. You can also bypass geo-restrictions and view such services as Netflix, BBC, Disney+, and other popular streaming services without limitations, regardless of where you are.

Malware attacks, particularly ransomware, are by far the biggest danger to your pictures, videos, work, or school files. Since cybercriminals use a robust encryption algorithm to lock data, it can no longer be used until a ransom in bitcoin is paid. Instead of paying hackers, you should first try to use alternative recovery methods that could help you to retrieve at least some portion of the lost data. Otherwise, you could also lose your money, along with the files. One of the best tools that could restore at least some of the encrypted files –  Data Recovery Pro.

What has not been granted the requested logon type?

To solve “The user has not been granted the requested logon type at this computer” error, you should make sure that the login user and all groups that belong to are allowed to log on locally to this computer.

What is logon failure?

A user sees the error “Logon failure: the user has not been granted the requested logon type at this computer” when attempting to log in through Duo Authentication for Windows Logon (RDP). Alternatively, a user may see the error "To sign in remotely, you need the right to sign in through Remote Desktop Services.

How do I grant allow log on locally permissions to domain user accounts?

The “Allow log on locally” setting specifies the users or groups that are allowed to log into the local computer. This policy can be found in Computer Configuration > Policies > Security Settings > Local Policies > User Rights Assignment > Allow log on locally.

How do I give log locally permission?

Navigate to Local Computer Policy >> Computer Configuration >> Windows Settings >> Security Settings >> Local Policies >> User Rights Assignment. If any accounts or groups other than the following are granted the "Allow log on locally" user right, this is a finding.