- Prerequisites for using Windows LAPS with Azure AD
- Benefits of enabling Windows LAPS with Azure AD
- Downsides of enabling Windows LAPS with Azure AD
- Implementation guide
- Create a local admin account
- Enabling LAPS in Azure AD
- Create the Intune Configuration Profile for LAPS
- Validating the LAPS deployment
- Retrieving the LAPS admin password
- Sign in with the LAPS admin account
- Force rotation of the LAPS admin password
- Auditing LAPS
- Conclusion
- Enable Windows LAPS with Azure AD - Tue, Jul 11 2023
- Security with Intune: Endpoint Privilege Management - Fri, Apr 28 2023
Windows LAPS is designed to help improve security by reducing the risk of a compromised local administrator password being used to gain unauthorized access to Windows devices on a network. It can also help simplify the management of local administrator passwords, reducing the need for manual password changes and ensuring that passwords are always strong and unique.
Windows LAPS addresses a security concern in which local administrator passwords are identical across all devices by automatically creating unique passwords for each device. Organizations can choose to save these passwords securely, either in Active Directory or Azure AD. In this article, you will learn if and how you can enable Windows LAPS with Azure AD.
Prerequisites for using Windows LAPS with Azure AD
Before setting up Windows LAPS with Azure AD, ensure that you meet the following requirements:
Azure Active Directory licensing: There are no license requirements for using LAPS with Azure AD.
Intune licensing: An Intune license is required to manage LAPS with Azure AD.
Windows requirements: Windows devices installed with April 2023 updates or later are supported for the implementation of Windows LAPS.
AD member requirements: Only Azure Active Directory and hybrid joined devices are supported; workplace-joined devices are not supported.
Privileges: You need to have one of the following roles in Azure AD: Global Administrator, Cloud Device Administrator, or Intune Administrator.
Note: After installing the April update, you should not add the legacy Microsoft LAPS to the system under any circumstances because this might break both versions, which requires either uninstalling legacy LAPS or deleting all registry values under the below registry key: HKLM\Software\Microsoft\Windows\CurrentVersion\LAPS\State
If the presence of legacy LAPS is detected, Windows LAPS will automatically run in Emulation mode with limited functionality.
Benefits of enabling Windows LAPS with Azure AD
Accessibility: With Azure AD enabled, you can access Windows LAPS from anywhere without VPN, making remote management more convenient.
Scalability: Azure AD provides scalability, allowing you to easily manage a large number of systems using Windows LAPS.
Automatic updates: Azure AD ensures that your Windows LAPS is always updated, reducing vulnerability to security risks.
Disaster recovery: Azure AD provides robust disaster recovery capabilities, safeguarding your Windows LAPS against potential data loss.
Downsides of enabling Windows LAPS with Azure AD
Complexity: Implementing Azure AD can be complex and may require a steep learning curve for IT teams not familiar with the platform.
Cost: You'll require an Intune license.
Dependency on internet connection: Azure AD requires an internet connection for authentication. If your internet service is down, it can cause disruption in accessing your Windows LAPS.
Data privacy concerns: While Azure AD and Intune have robust security measures, some organizations may be uncomfortable storing security-related data on a third-party platform.
Implementation guide
As mentioned earlier, this guide will focus on enabling Windows LAPS with Azure AD, not the legacy Microsoft LAPS. If you are interested in migrating from the legacy version to Windows LAPS, refer to Microsoft's documentation.
Enabling Windows LAPS with Azure AD requires three steps:
- Create a local admin account or enable the built-in admin account.
- Enable LAPS in Azure AD.
- Create the Intune configuration profile for LAPS.
- Assign the policy to devices.
Create a local admin account
You can either choose to enable the built-in Administrator account or create a new local admin account to be used with LAPS. Here, I will explain how to create a custom local user account that will be used as the LAPS Admin account.
- Log in to Microsoft Intune admin center.
- Go to Devices > Configuration profiles > Create profile.
- For Platform, select Windows 10 and later.
- For Profile type, select Templates.
- Provide a suitable name and description for the policy, and click Next.
- Click the Add button to add OMA-URI settings and provide the following details:
- Name: Create Local User Account
- OMA-URI: /Device/Vendor/MSFT/Accounts/Users/lapsadmin/Password
- Data type: String
- Value: T3mpAdm1n$
- Click the Add button again to add OMA-URI settings and provide the following details:
- Name: Add user to Built-in Administrator group
- OMA-URI: ./Device/Vendor/MSFT/Accounts/Users/lapsadmin/LocalUserGroup
- Data type: Integer
- Value: 2
- Click Next.
- Assign the policy to an Azure AD security group that contains users or devices where this device configuration profile needs to be deployed.
- Click Create to create the policy.
This policy will now create a local user named lapsadmin and add it to the built-in Administrators group (as shown below).
Enabling LAPS in Azure AD
The first step is to toggle on LAPS in AAD.
- Log in to Azure Active Directory.
- Go to Devices > Device Settings.
- Toggle Yes on Enable Azure AD Local Administrator Password Solution (LAPS)
- Click Save.
Create the Intune Configuration Profile for LAPS
Now let's create the policy for LAPS in Intune.
- Open the Intune console.
- Navigate to Endpoint Security > Account Protection.
- Click Create Policy.
- Choose Windows 10 and later for Platform and select Local admin password solution (Windows LAPS).
- Click Create.
- Provide a suitable name, such as 'LAPS Policy', and click Next.
- Configure the policy; options are explained below:
- Backup Directory: Choose "Backup the password to Azure AD only."
- Password Age Days: Set this to 7 days (default). The value must be between 7 and 365 days.
- Administrator Account Name: Type the name of the local account you created in the first step here.
- Password Complexity: The default is "Large letters + small letters + numbers + special characters." If you want a simple password, you can change it by choosing the options in the dropdown list.
- Password Length: You can set this from 8 to 64 characters. I have chosen 18.
- Post Authentication Actions: This sets the time limit for a LAPS password before the password is reset. This prevents someone from using the LAPS password indefinitely. You can choose the appropriate option, as shown below:
- Reset password: At the end of the grace period, the managed account password will be reset.
- Reset the password and log off the managed account: At the end of the grace period, the managed account password will be reset, and any interactive logon sessions using the managed account will be terminated. This is the default behavior.
- Reset the password and reboot: At the end of the grace period, the managed account password will be reset, and the managed device will be immediately rebooted.
- Post Authentication Reset Delay: Sets the delay in hours before the actions above are executed. If not specified, this setting will default to 24 hours.
Note: I have not configured any post authentication actions or reset delays, but feel free to explore these options.
- Click Next.
- Assign the policy to an Azure AD Security group that contains users or devices where this device configuration profile needs to be deployed.
- Click Create to create the policy.
Validating the LAPS deployment
You can validate that the LAPS policy has been applied to the client device from the following Registry location: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Policies\
The following registry entries are created by Intune:
- AdministratorAccountName: lapsadmin
- BackupDirectory: 1
- PasswordAgeDays: 7
- PasswordComplexity: 4
- PasswordLength: 18
- PostAuthenticationResetDelay: 0
Note: Windows LAPS uses a background task that runs every hour to check whether the password has expired. If it expires, the password will be reset, and the new password will be updated in Azure AD.
Retrieving the LAPS admin password
The LAPS admin account password is stored in both Intune and Azure AD, so we can retrieve it from both portals.
Retrieve password with Intune
- Log in to the Intune portal.
- Go to Devices > All Devices.
- Click the device that is targeted by the Windows LAPS policy.
- On the left-hand side, under Monitor, find the Local admin password option.
- Click Show local administrator password.
- Click Show to check the password in plain text.
Retrieve password with Microsoft Entra
- Log in to the Entra admin center (or Azure AD Portal).
- Go to Devices > All devices.
- Click the Local administrator password recovery (Preview) option on the left side, and then click the Show local administrator password option for the device for which you want to retrieve the password.
Sign in with the LAPS admin account
Once you retrieve the password, you can log in to the managed device using .\<local account name> as the username and using the LAPS password.
Force rotation of the LAPS admin password
As the local admin account is now managed by Intune, the password is automatically rotated based on the setting configured for Password age days, which in this case is every seven days.
However, the password can also be manually rotated by an administrator in the event of a security breach in which the local admin password is compromised.
- Log in to the Intune portal.
- Go to Devices > Windows > select the required device.
- Click the three dots in the top menu, and then select Rotate local admin password.
Auditing LAPS
LAPS activities can be audited from Azure AD. From the Azure AD portal, navigate to Devices > Audit Logs. Then search for Update device local administrator password or Recover device local administrator password to view the audit events.
Subscribe to 4sysops newsletter!
Conclusion
Enabling Azure AD in Windows LAPS through Intune offers various benefits with regard to accessibility, scalability, automatic updates, and disaster recovery for managing local admin passwords. However, it's important to note that this feature is currently in public preview. The utilization of Azure's role-based access control ensures that access to clear-text passwords is restricted to authorized individuals holding specific administrative roles, such as Global Administrators, Cloud Device Administrators, and Intune Administrators.
Nice write up.
Does AAD store old admin passwords? For example, we back up certain machines for DR or VIP needs. So the backup image could have an older password for admin access
Thanks Nosbus.
As the password is configured to rotate automatically after x number of days (based on what is configured in the policy), when the back up is restored it should rotate based on the time stamp.