Skip to content
The Lazy Administrator
  • Home
  • Disclaimer
  • Contact
  • About Me
  • Search Icon

The Lazy Administrator

Finding ways to do the most work with the least effort possible

Windows LAPS Management, Configuration and Troubleshooting Using Microsoft Intune

Windows LAPS Management, Configuration and Troubleshooting Using Microsoft Intune

April 22, 2023 Brad Wyatt Comments 39 comments

Table of Contents

  • Pre-requisites
  • Configure LAPS with Intune
    • Create Account Protection Policy
    • Configuration Settings
  • Viewing a Device’s Local Admin Password
    • Microsoft Entra
    • Intune Portal
    • PowerShell
      • Install the PowerShell Modules
      • Create an Azure Active Directory registered app to retrieve Windows LAPS passwords
      • Retrieve Password
  • Rotate Passwords
    • Intune Portal
    • PowerShell
  • Manually Force Policy Processing
  • Windows LAPS Troubleshooting
    • Windows LAPS Event Logs
    • PowerShell
    • Azure Audit Logs

Windows Local Administrator Password Solution (Windows LAPS) is a Windows Feature that allows IT Administrators to secure and protect local administrator passwords. This includes automatic rotation of passwords as well as backing up the passwords to Azure Active Directory or Active Directory. You can configure Windows LAPS on your Windows endpoints using Microsoft Intune.

Pre-requisites

To use Windows LAPS in Intune, ensure you’re using a supported Windows platform:

  • Windows 10 20H2 and later with April 11, 2023 security updates installed
  • Windows 11 21H2 and later with April 11, 2023 security updates installed
  • Windows Server 2019 and later with April 11, 2023 security updates installed

You might also have to enable Azure AD Local Administrator Password Solution (LAPS) within your Azure Tenant.

  • Azure Active Directory > Devices > Device Settings > Azure AD Local Administrator Password Solution (LAPS)
    Note: You may not have to do this once the product is out of Public Preview.

Configure LAPS with Intune

Create Account Protection Policy

In the Microsoft Intune Portal (Intune.Microsoft.com) go to Endpoint Security > Account Protection and click + Create Policy

For Platform select, “Windows 10 or later” and for Profile select, “Local admin password solution (Windows LAPS)”

Once completed, click Create

Give your new policy a proper name and description (optional) and then click Next

Configuration Settings

Below I will review the different configuration options that are available. Microsoft also maintains documentation for all settings here.

Backup Directory: Allows you to backup the Local Administrator password to Azure Active Directory or Active Directory.

Administrator Account Name: If configured, the specified account’s password will be managed via the policy. If not specified, the default built-in local administrator account will be located by well-known SID (even if it has been renamed)

Note: if a custom managed local administrator account name is specified in this setting, that account must be created via other means. Specifying a name in this setting will not cause the account to be created.

Password Complexity: Allows an IT admin to configure password complexity of the managed local administrator account.

Password Length: Configure the length of the password. By default the value is 14, the minimum value is 8 and maximum value is 64.

Post Authentication Actions: This setting specifies what LAPS should do with the account after a successful authentication. By default it will log off the managed account and reset the password.

Post Authentication Reset Delay: How long it will wait until it performs the Post Authentication Action that we specified above. Default is 24 hours.

In the Assignments tab, assign the new policy to a device group, or all devices.

In the Review + Create pane, verify the policy meets your requirements prior to finishing.

Viewing a Device’s Local Admin Password

There are several ways an IT administrator can view an endpoints local administrator password, from the Intune Admin Portal, Microsoft Entra, to even using PowerShell.

Microsoft Entra

First, navigate to the Microsoft Entra admin portal here.

On the left pane under Azure Active Directory > Devices > click All Devices

On the left pane you can select Local Administrator Password Recovery and from there show the administrator password.

Intune Portal

Navigate to the Intune Portal at intune.microsoft.com and go to Devices and then select your device. On the left Pane you will see Local admin password.

Next, you can click to view the local administrator password.

Note: If admins don’t have the correct permissions, they won’t be able to view the relevant information. This information is controlled by the deviceLocalCredentials.Read.All permissions that are specific to Global Admin, Cloud Device Admin, and Intune Admin, which only allows them to recover the Windows LAPS password.

PowerShell

Install the PowerShell Modules

First, Install the Microsoft Graph SDK

Install-Module Microsoft.Graph -Scope AllUsers

Next, install the Az module

Install-Module Az -Scope AllUsers

Create an Azure Active Directory registered app to retrieve Windows LAPS passwords

Using the Az module, connect to Azure by running Connect-AzAccount

Connect-AzAccount

Next, we need to create the Azure AD registered application. Using the PowerShell code below, we can create a new application called IntuneLAPSadmin.

$AppRegistrationSplat = @{
	DisplayName    = "IntuneLAPSadmin"
}

$AzureADApp = New-AzADApplication @AppRegistrationSplat 

Next, we need to grant the proper permissions to our newly created Application. The application must have the Device.Read.All permission and then one of the following two, DeviceLocalCredential.Read.All or DeviceLocalCredential.Read.All.

  • Use DeviceLocalCredential.ReadBasic.All to grant permissions for reading non-sensitive metadata about persisted Windows LAPS passwords. Examples include the time the password was backed up to Azure and the expected expiration time of a password. This permissions level is appropriate for reporting and compliance applications.
  • Use DeviceLocalCredential.Read.All to grant full permissions for reading everything about persisted Windows LAPS passwords, including the clear-text passwords themselves. This permissions level is sensitive and should be used carefully.

The table below will list the permission and its corresponding permission ID. Take note of the permission ID for the next step.

PermissionID
Device.Read.All7438b122-aefc-4978-80ed-43db9fcc7715
DeviceLocalCredential.Read.All884b599e-4d48-43a5-ba94-15c414d00588
DeviceLocalCredential.ReadBasic.Alldb51be59-e728-414b-b800-e0f010df1a79

$AppPermissions = @(
	"7438b122-aefc-4978-80ed-43db9fcc7715"
	"884b599e-4d48-43a5-ba94-15c414d00588"
)

$AppPermissions | ForEach-Object {
	Add-AzADAppPermission -ObjectId $AzureADApp.id -ApiId '00000003-0000-0000-c000-000000000000' -PermissionId $_ -Type Role
}

Note: In my example above I am using the DeviceLocalCredential.Read.All permission. Ensure that you choose the correct permission.

In the Azure Portal, we need to create a Redirect URI for Mobile and desktop applications. This is done in the Azure Portal to Active Directory > App Registrations > [ Your Newly Created Application ] > Authentication and add a custom redirect URI of ‘http://localhost’.

Finally, grant admin consent for the permissions. For this you must go to the Azure Portal to Active Directory > App Registrations > [ Your Newly Created Application ] > API Permissions.

Retrieve Password

First we need to get two items, the ClientID of our application and our tenantID.

ClientID: Azure Portal to Active Directory > App Registrations > [ Your Newly Created Application ]

TenantID: Either use this website, or go to the Azure Portal > Azure Active Directory

Next, using PowerShell and the information gathered above, sign into Microsoft Graph

Connect-MgGraph -Environment Global -TenantId 6438b2c9-54e9-4fce-9851-f00c24b5dc1f -ClientId  e12bba1a-2763-4899-9e67-e434f92dcf6a -Scopes "Device.Read.All","DeviceLocalCredential.Read.All"

Note: If you granted the permission ‘DeviceLocalCredential.ReadBasic.All’ and not ‘DeviceLocalCredential.Read.All’ then replace the scope with ‘DeviceLocalCredential.ReadBasic.All’

When logging into the first time, you may need to accept the permission prompt.

Once it has authenticated you will be presented with a welcome message welcoming you to the Microsoft Graph API.

To get the LAPS password information of a device you will need the device ID (found in the Azure AD Portal). Once you have the device ID, run the following command

Get-LapsAADPassword -DeviceIds 8155b933-9cfa-4d86-ba50-dd72ca6579db

Notice how the information returned does not include the device password. If you granted the permission ‘DeviceLocalCredential.Read.All’ you can run the following command to include the LAPS password for the device.

Get-LapsAADPassword -DeviceIds 8155b933-9cfa-4d86-ba50-dd72ca6579db -IncludePasswords -AsPlainText

Rotate Passwords

Intune Portal

In the Intune Portal, click the device and then click the ellipses in the device overview. From there click Rotate local admin password.

Once the endpoint reboots, the password will be changed.

PowerShell

The cmdlet Reset-LapsPassword is ran locally against a machine that is using Windows LAPS. In the example below I am viewing my devices password before and after a rotation to show that it quickly and easily rotated the password.

Manually Force Policy Processing

Windows LAPS processes the currently active policy on a periodic basis (every hour). To avoid waiting after you apply the policy, you can run the Invoke-LapsPolicyProcessing PowerShell cmdlet (does require Administrator rights).

Windows LAPS Troubleshooting

Windows LAPS Event Logs

Windows LAPS logs can be found in the Windows Event Viewer at Applications and Services Logs > Microsoft > Windows > LAPS

An overview of possible EventID’s relating to Windows LAPS can be found below:

Event IDDescription
10003LAPS policy processing is now starting.
10004LAPS policy processing succeeded.
10005LAPS policy processing failed with an error code.
10021Policy is configured to back up the password to Windows Server Active Directory.
10022Policy is configured to back up the password to Azure Active Directory.
10023Windows LAPS is configured to use a legacy Microsoft LAPS policy.
10018LAPS successfully updated Active Directory with the new password.
10029LAPS successfully updated Azure Active Directory with the new password.
10020LAPS successfully updated the local admin account with the new password.
10031LAPS blocked an external request that tried to modify the password of the current managed account.
10041LAPS detected a successful authentication for the currently managed account, and a background task has been scheduled for post-authentication actions.
10042The post-authentication grace period expired per policy; configured post-authentication actions will now be executed.
10043LAPS failed to reset the password for the currently managed account; the system will continue retrying the password reset operation.
10044LAPS successfully reset the password for the currently managed account and completed all configured post-authentication actions.
10033The machine is configured with legacy LAPS policy settings, but a legacy LAPS product is installed. The password will not be managed by Windows until the legacy product is uninstalled or newer LAPS policy settings are configured.
10066LAPS received an LDAP_INSUFFICIENT_RIGHTS error trying to update the password using the LAPS password attribute. You should update the permissions on this computer’s container using the Set-LapsADComputerSelfPermission cmdlet
10017LAPS failed to update Active Directory with the new password. The current password has not been modified.
10015The managed account password needs to be updated due to one or more reasons (0x1A06)
Account does not have a password expiration attribute
The policy authority has changed
The policy is configured for password encryption but the encrypted password attribute was not found
The policy was changed to specify a different password encryption target
Local state is missing and/or inconsistent with directory state
10052LAPS is processing the current policy per normal background scheduling.
10011LAPS failed when querying Active Directory for the current computer state. Error code: 0x80070031
10054LAPS is processing the current policy in response to a Group Policy change notification.
10057LAPS was unable to bind over LDAP to the domain controller:

PowerShell

The Get-LapsDiagnostics PowerShell cmdlet collects Windows Local Administrator Password Solution (LAPS) logs and tracing from the local machine. Included in this zip is the current device configuration and an overview of the LAPS Windows Event Logs.

Azure Audit Logs

Windows LAPS events are also sent to Azure Audit Logs which can be viewed within the Azure Portal.

Brad Wyatt
Brad Wyatt

My name is Bradley Wyatt; I am a 5x Microsoft Most Valuable Professional (MVP) in Microsoft Azure and Microsoft 365. I have given talks at many different conferences, user groups, and companies throughout the United States, ranging from PowerShell to DevOps Security best practices, and I am the 2022 North American Outstanding Contribution to the Microsoft Community winner.


Intune
Accounts, Graph, Intune, LAPS, PowerShell

Post navigation

PREVIOUS
Modern Active Directory – An update to PSHTML-AD-Report
NEXT
Centrally Manage Company Contacts and Deploy to Built-In Contacts App Using Intune, SharePoint, PowerShell and Graph API.

39 thoughts on “Windows LAPS Management, Configuration and Troubleshooting Using Microsoft Intune”

  1. Ibrahem Tori says:
    April 23, 2023 at 5:59 am

    Hey Brad,

    Thanks for sharing this informative step by step LAPs Integration.
    I have a question, I can see all the features related to Windows LAPs in my Tenant
    But cannot see this switch :
    Azure Active Directory > Devices > Device Settings > Azure AD Local Administrator Password Solution (LAPS)

    Do you have any idea?

    Regards

    Reply
    1. Brad Wyatt says:
      April 24, 2023 at 3:37 pm

      Do you mean you cannot view the password for the device? Make sure the policy is applied to device and not a user. Also wait a few hours once you roll out the policy, it was not immediate for me

      Reply
    2. prateek mittal says:
      May 1, 2023 at 1:52 am

      Please check the azure roles you have. I also had the same issue but when a person having more roles checked, he is able to see that

      Reply
    3. Alex says:
      January 25, 2024 at 5:31 pm

      it Actually changed to Entra>Identity>Devices>All Devices>Device Settings> Azure AD Local Administrator Password Solution (LAPS)

      Reply
  2. Pingback: Intune Newsletter - 23rd April 2023 - Andrew Taylor
  3. Pingback: Simon does Five Approaches For Local Admin Access On The Azure AD Joined PC
  4. Dustin White says:
    April 24, 2023 at 12:52 pm

    This is a nice writeup, I have enjoyed articles from thelazyadmin for years.

    Reply
  5. Serge says:
    April 25, 2023 at 3:31 am

    Hi Brrad,

    Thanks for you tuto.
    It seems to me that it is still in pre-release but from your image, you have not (Windows insider Only).
    Why is that?

    Reply
    1. Brad Wyatt says:
      April 25, 2023 at 6:09 am

      It is in Public Preview, you should see it in your Intune Tenant

      Reply
  6. Joseph Kilonzo says:
    April 25, 2023 at 8:42 am

    Wonderful piece of information

    Reply
  7. Anders M says:
    April 27, 2023 at 1:09 am

    Great writeup, thank you.

    On our aad joined windows devices, the local admin account is disabled by default. Just wondering if you know any good and secure solution for enabling them while using LAPS? Is it better to stay with the built-in or make a dedicated account?

    Reply
    1. Brad Wyatt says:
      May 1, 2023 at 8:19 am

      I would re-enable them via policy or script prior to rolling our LAPS

      Reply
    2. Max says:
      June 9, 2023 at 11:23 am

      Best to create a new local admin (I did so through a Powershell script) and assign it the LAPS config. The built in Administrator account has a well known SID and is easier to figure out for potential hackers..

      Reply
  8. Chetan says:
    April 27, 2023 at 2:28 am

    This didn’t work.
    Do we need to enable LAPS from Azure AD device settings?
    Do we need to have local admin account already in place?
    And yes, the policy is applied to device and not user.

    Reply
    1. Brad Wyatt says:
      May 1, 2023 at 8:20 am

      While in public preview you may have to enable LAPS for your tenant. I just used the default local admin for Windows

      Reply
    2. James Clinton says:
      May 9, 2023 at 3:49 am

      You need to create the local admin user separately
      https://learn.microsoft.com/en-us/troubleshoot/windows-server/windows-security/windows-laps-troubleshooting-guidance
      I had error 10013 – which is – account not found

      Reply
  9. Jaynish Dave says:
    April 27, 2023 at 11:32 pm

    Hey Brad,
    As shown above I have done all the settings but I cannot see LAPS password in intune portal nor in powershell, can you help me with it please. After completing policy I almost waited for a day but still I cannot see any password.

    Reply
    1. Brad Wyatt says:
      April 28, 2023 at 12:47 pm

      is it processing the policy, what do you see in logs

      Reply
      1. Jaynish Dave says:
        May 1, 2023 at 1:46 am

        I got the password thanks, after searching for solution.

        Reply
  10. Olivier M says:
    April 28, 2023 at 3:08 am

    Hi Brad,

    Thanks for that 🙂

    I have an issue with the app registration and the redirect URI

    I added the http://localhost.

    Message: AADSTS50011: The redirect URI ‘https://login.microsoftonline.com/common/oauth2/nativeclient’ specified in the request does not match the redirect URIs configured for the application

    Regards

    Reply
    1. Brad Wyatt says:
      April 28, 2023 at 12:46 pm

      I had this same error, I had to change the redirect URI to a mobile and desktop client URI instead of web.

      If so, in that same pane, click to allow public flows

      Also can be fixed by clicking the first checkbox in the URI’s

      Reply
      1. Olivier M says:
        May 4, 2023 at 5:07 am

        Thanks it works now 🙂

        Have a good day

        Reply
  11. Pingback: April 29, 2023 - Red-N Security
  12. Quinn says:
    May 2, 2023 at 8:57 pm

    This was really helpful, especially the app registration steps. We are not currently managing devices in Intune. But our devices are HAADJ. I would like to take advantage of the Azure management option. This is possible with HAADJ devices not Intune managed, correct? As I understand it the Windows LAPS policy would be configured via GPO instead of Intune. Thanks!

    Reply
    1. Brad Wyatt says:
      May 3, 2023 at 5:24 pm

      I am not 100% but I believe it’s possible with HAADJ devices but I have no confirmed

      Reply
  13. Pieter P. says:
    May 8, 2023 at 3:10 am

    Hi Brat, good article. Do we need to activate the local admin, or is that somewhere in the procedure? Default is disabled built-in local admin.

    Reply
    1. Benjamin Berglund says:
      June 14, 2023 at 11:54 am

      Hi Pieter, yes you have to activate the local administrator account (if using the built-in), the LAPS policy will not do that. If using Intune, create a settings catalog configuration policy for “Local Policies Security Options” and enable “Accounts Enable Administrator Account”.

      If you try and push the admin activate policy before pushing the LAPS policy, it will most likely fail. The reason, the original password on the disabled administrator account doesn’t adhere to the current password policy requirement. Just wait until the LAPS policy has changed the password and the Intune policy has ben rerun, then it should be activated.

      Reply
  14. Sachin says:
    May 29, 2023 at 7:56 am

    I want to create a custom role for our local IT guys to see the LAPS password but I don’t want to give them Intune admin access or Cloud device administrator access, is there a way we can create a custom role in Azure ad or any relevant solution?

    Reply
  15. dnz says:
    June 1, 2023 at 3:34 am

    My issue is that ‘User must change password at first logon’ setting is the default for the newly created admin account (via other means – custom OMA uri setting) and so even if LAPS has roatetd the pwd, I cannot login. 🙁

    Reply
    1. 23olHead78 says:
      December 12, 2023 at 10:47 am

      I, too, am running into this issue where the LAPS policy is configured and sometimes works; other times I get put in the LAPS password and the UAC prompt outputs “The user’s password must be changed before logging on the first time.”

      Were you able to find a solution to this? I haven’t seen much related to this issue aside from your comment.

      Reply
  16. Abner says:
    June 15, 2023 at 12:37 pm

    Thank You, this is perfect. I tried it in my lab environment and I was able to view the password in https://entra.microsoft.com/. However I do not see “Local admin password” option (which is between Recovery Keys and App configuration in one of your pictures above) when I go to Devices and i also do not see the rotate local admin password option in Intune. Any ideas?

    Reply
  17. Eugene Meenan says:
    June 19, 2023 at 1:17 pm

    My problem is one of our machines I had to reset due to compliance issues, it was assigned to user in auto pilot but they now have no admin rights and I can’t seem to deploy any rights to any of us admin guys, hoped setting up laps may solve solution but can’t figure how to get account setup on device, even if policy on intune setup. Without another reset how can this be resolved?

    Reply
  18. Eugene Meenan says:
    October 2, 2023 at 8:33 am

    I did eventually get there – one thing I have come across is I set policy so new device autopiloted – pre-provisioned and on checking the admin account renamed, but of course it will not be able to backup LAPS password until actual user logged in for first time, this has left me in scenario of using the Shift F10 to see what’s happening and I notice the admin account renamed but on properties Password never expires is ticked, could this be standard ,has anyone noticed or is there a conflicting policy that won’t be able to apply until actual user logs in for first time.

    Reply
  19. JEAN says:
    November 29, 2023 at 11:17 am

    Hey !

    I Would like to extract windows LAPS on CSV file for all devices on my azure tenant !

    Get-LapsAADPassword -DeviceIds
    i have this but no idea how to do the rest ….

    Reply
  20. Pingback: Why You Need LAPS and How to Deploy it with Intune | Andrew Chew
  21. CAR PARKING MULTIPLAYER APP says:
    January 14, 2025 at 9:04 pm

    Great insights on Windows LAPS management! The step-by-step troubleshooting tips were particularly helpful. I appreciate how you broke down the configuration using Microsoft Intune. It made implementing the changes so much easier for me. Thanks for sharing!

    Reply
  22. 82 lottery login says:
    February 15, 2025 at 10:29 am

    Great insights on Windows LAPS management! The step-by-step approach to configuration using Microsoft Intune is especially helpful for those new to the process. Looking forward to more posts like this!

    Reply
  23. Rejekibet APK says:
    February 17, 2025 at 12:40 pm

    Great post! The step-by-step guide on configuring LAPS with Intune was incredibly helpful. I appreciate the troubleshooting tips too; they will definitely save time in the future. Looking forward to more insights!

    Reply
  24. LOTTERY 365 LOGIN says:
    April 21, 2025 at 9:56 pm

    Great post! I appreciate the step-by-step guidance on configuring LAPS with Intune. The troubleshooting tips are especially helpful—I’m sure they’ll save me a lot of time in the future. Thanks for sharing your insights!

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Subscribe

Email


Categories

  • Active Directory (8)
  • AI (3)
  • API (1)
  • AutoPilot (2)
  • Azure (15)
  • Bicep (4)
  • Connectwise (1)
  • Defender for Cloud Apps (1)
  • Delegated Admin (1)
  • DevOps (6)
  • Graph (6)
  • Intune (15)
  • LabTech (1)
  • Microsoft Teams (6)
  • Office 365 (19)
  • Permissions (2)
  • PowerShell (50)
  • Security (1)
  • SharePoint (3)
  • Skype for Business (1)
  • Terraform (1)
  • Uncategorized (2)
  • Yammer (1)

Recent Comments

  • MD SHARIQUE AKHTAR on Modern Active Directory – An update to PSHTML-AD-Report
  • TommyBoich on How The ConnectWise Manage API Handles Pagination with PowerShell
  • LOTTERY 365 LOGIN on Windows LAPS Management, Configuration and Troubleshooting Using Microsoft Intune
  • SPRUNKI PHASE 6 on Get a New Computer’s Auto Pilot Hash Without Going Through the Out of Box Experience (OOBE)
  • Mohammad Sherbaji on Get a New Computer’s Auto Pilot Hash Without Going Through the Out of Box Experience (OOBE)

1,738,845 People Reached

© 2025   All Rights Reserved.