Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Select, configure, and scale Azure compute resources—VMs, App Service, AKS, and Container Apps
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
workflows/vm-troubleshooter/references/credential-auth-errors.md
1# Credential and Authentication Errors23User can reach the VM but authentication fails.45## Windows (RDP) — Symptoms → Solutions67| Symptom | Solution | Documentation |8| ---------------------------------------------------------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |9| "Your credentials did not work" | Reset password via Portal or CLI | [Reset RDP service or password](https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/reset-rdp) |10| "Must change password before logging on" | Reset password via Portal (bypasses the requirement) | [Reset RDP service or password](https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/reset-rdp) |11| "This user account has expired" | Extend account via Run Command: `net user <user> /expires:never` | [Reset RDP service or password](https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/reset-rdp) |12| "Trust relationship between workstation and domain failed" | Reset machine account or rejoin domain | [Troubleshoot RDP connection](https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/troubleshoot-rdp-connection) |13| "Access is denied" / "Connection was denied" | Add user to Remote Desktop Users group | [Specific RDP errors](https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/troubleshoot-specific-rdp-errors#wincred) |14| Wrong username format | Use `VMNAME\user` for local, `DOMAIN\user` for domain accounts | [Specific RDP errors](https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/troubleshoot-specific-rdp-errors#wincred) |15| CredSSP "encryption oracle" error | Temporary: set AllowEncryptionOracle=2 on client; permanent: patch both sides | [CredSSP remediation](https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/credssp-encryption-oracle-remediation) |1617## Linux (SSH) — Symptoms → Solutions1819| Symptom | Solution | Documentation |20| ----------------------------------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |21| "Permission denied (publickey)" | Wrong key, wrong user, or key not in authorized_keys — reset key via CLI | [Detailed SSH troubleshooting](https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/linux/detailed-troubleshoot-ssh-connection) |22| "Permission denied (password)" | Wrong password or password auth disabled in sshd_config | [Detailed SSH troubleshooting](https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/linux/detailed-troubleshoot-ssh-connection) |23| Account locked after failed attempts | Unlock via Run Command: `passwd -u <user>` or `pam_tally2 --reset --user <user>` | [Troubleshoot SSH connection](https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/linux/troubleshoot-ssh-connection) |24| "Permission denied" with Entra ID (AAD) SSH login | Missing role: Virtual Machine Administrator Login or Virtual Machine User Login | [Troubleshoot SSH connection](https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/linux/troubleshoot-ssh-connection) |25| sudo password prompt fails / user not in sudoers | Fix via Run Command or Serial Console | [Troubleshoot SSH connection](https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/linux/troubleshoot-ssh-connection) |2627## Quick Commands — Windows2829> ⚠️ **Warning:** Commands below use the VM agent/extensions. Run [Pre-Flight Safety Checks](cannot-connect-to-vm.md#pre-flight-safety-checks) before using them.3031```bash32# ⚡ Reset password33az vm user update --name <vm-name> -g <resource-group> -u <username> -p '<new-password>'3435# ⚡ Reset RDP configuration (also re-enables NLA)36az vm user reset-remote-desktop --name <vm-name> -g <resource-group>37```3839## Quick Commands — Linux4041> ⚠️ **Warning:** Commands below use the VM agent/extensions. Run [Pre-Flight Safety Checks](cannot-connect-to-vm.md#pre-flight-safety-checks) before using them.4243```bash44# ⚡ Reset SSH public key45az vm user update --name <vm-name> -g <resource-group> \46-u <username> --ssh-key-value "<ssh-public-key>"4748# ⚡ Reset password for Linux VM49az vm user update --name <vm-name> -g <resource-group> \50-u <username> -p '<new-password>'5152# ⚡ Unlock a locked account via Run Command53az vm run-command invoke --name <vm-name> -g <resource-group> \54--command-id RunShellScript --scripts "passwd -u <username>"55```56