Close Menu
Peter Klapwijk – In The Cloud 24-7Peter Klapwijk – In The Cloud 24-7
    Facebook X (Twitter) Instagram
    Peter Klapwijk – In The Cloud 24-7Peter Klapwijk – In The Cloud 24-7
    • Home
    • Intune
    • Windows
      • Modern Workplace
    • macOS
    • Android
    • iOS
    • Automation
      • Logic Apps
      • Intune Monitoring
      • GitHub
    • Security
      • Passwordless
      • Security
    • Speaking
    • About me
    Peter Klapwijk – In The Cloud 24-7Peter Klapwijk – In The Cloud 24-7
    Home»Intune»Create a local user account on Windows 10 with Microsoft Intune
    Intune

    Create a local user account on Windows 10 with Microsoft Intune

    Peter KlapwijkBy Peter KlapwijkApril 12, 2020Updated:April 14, 2020343 Mins Read

    After last weeks blog post about restricting which users can logon into a Windows 10 device, today another post about managing local users and local rights. In this post I show how we can create a local user account on a Windows 10 device with Microsoft Intune. Optional we can assign the local account Administrator rights.

    Like in the previous post we need to use a Configuration Service Provider (CSP) policy and a Custom configuration profile to get the job done. This time we need to use the Accounts CSP.

    All info we need can be found at the Microsoft docs here.

    Configure the Custom Configuration profile

    • Sign-in to the Endpoint Manager admin center
    • Browse to Devices – Windows
    • On the Configurations profiles tab click + Create profile
    • Choose Windows 10 and later as Platform
    • Choose Custom as Profile type
    • Click Create
    • Give the configuration profile a Name
    • Enter a Description (optional)
    • Click the Settings tab
    • Click Add

    A part of the OMA-URI contains the username for the local account we create: Users/{UserName}/LocalUserGroup
    Replace UserName with the username of your choice. In my example I create a new user account with the username LocalUser.
    The Data type is String.
    As value we need to provide the password of the local user account.

    In my example I create a local user account with the username LocalUser.

    Enter below information to the policy;
    Name: RestrictedGroups – ConfigureGroupMembership
    OMA-URI: ./Device/Vendor/MSFT/Accounts/Users/LocalUser/Password
    Data Type: String
    Value: Your Password

    Click OK.

    Optional is the second Row we can add to assign the local user Administrator rights on the device. If this setting is not set, the user account will be a standard user account.

    Click Add.

    Enter below information to the policy if you want to assign Administrator rights;
    Name: RestrictedGroups – ConfigureGroupMembership
    OMA-URI: ./Device/Vendor/MSFT/Accounts/Users/LocalUser/LocalUserGroup
    Data Type: Integer
    Value: 2

    Click OK (twice) and click Create.

    Assign the profile to a security group and we`re ready to check the end result.

    End result

    When we check the local Users via Computer Management, we see a new local user account is created. In this example LocalUser.

    And I have added a second row to assign the new local user account Administrator rights. The local user account is member of the local Administrators group.

    NB: If you want to sign-in with a local account into a Windows 10 Azure AD joined device, as with a AD joined device, put “.\” before the username.

    That`s it for this post, thank you for reading!

    NB: In the Endpoint Manager admin center, the policy shows an Error state even if the policy is applied successful.

    Intune MEM Microsoft Endpoint Manager Security Windows 10
    Share. Facebook Twitter LinkedIn Email WhatsApp
    Peter Klapwijk
    • Website
    • X (Twitter)
    • LinkedIn

    Peter is a Security (Intune) MVP since 2020 and is working as Modern Workplace Engineer at Wortell in The Netherlands. He has more than 15 years of experience in IT, with a strong focus on Microsoft technologies like Microsoft Intune, Windows, and (low-code) automation.

    Related Posts

    Add a certificate to the Trusted Publishers with Intune without reporting errors

    May 31, 2022

    Manage the local administrators group with Microsoft Intune – Hybrid AAD joined Windows 10 devices

    April 13, 2020

    Restrict which users can logon into a Windows 10 device with Microsoft Intune

    April 11, 2020
    View 34 Comments

    34 Comments

    1. Dan C; on April 13, 2020 11:43

      hi
      i think there is some mistake in your post
      the 2nde one to assing local admin rights, i think the oma-uri is not good.

      Also you said “replace UserName with the username of your choice. But on the oma-uri, it is “localuser” that we should replace right ?

      Could you please be more specific ? or detail it more ? thanks 🙂

      Reply
      • Peter Klapwijk on April 13, 2020 15:24

        Hi Dan,

        Thanks for pointing me on the wrong URL.

        I hope the text is now more clear, if note please let me know. Than I will replace the text + screen shorts with a more clear example. I can imagine LocalUser as example isn`t very clear 🙂

        Reply
        • Dan C. on April 13, 2020 16:31

          thanks for the reply. By the way, great article, because, it works.
          Just a tip : i would have put LocalUser (without S ! typo in your text 🙂 ) between brackets . This way, when we see the command line (the Oma-uri) we know that this text has to be changed.

          Also, i would have mentioned that to login on a pc joined to AAD (with intune), you need to put “.\”. Without that, it will only accept AAD login, not a local one (at least on my computers…i don’t know if it is the common behavior).

          Many thanks 🙂

          Reply
          • Peter Klapwijk on April 13, 2020 18:02

            Thanks for the feedback!

            Yes you need to put “.\” before the username, like you need with an AD joined device.

            Reply
    2. Dan C. on April 14, 2020 19:17

      Hi 🙂
      It works but on intune it shows remediation failed. Dont know why…
      But the policy is applied.

      Reply
      • Richard on April 25, 2020 09:07

        Same here, policy applied successfully only its keeps showing remediation failed.
        Any idea why? or how to make it success @Peter

        Reply
        • Richard on April 25, 2020 09:29

          nevermind found this is still a issue.

          Reply
          • Jarvis on September 21, 2020 15:50

            Just want to check if this “remediation failed” is still showing up on your end? We’re trying to use the same steps and the deployment status always shows error -remediation failed. Thanks mate!

            Reply
        • Peter Klapwijk on April 25, 2020 09:29

          Hi guys!

          I noticed the same, therefor the very first note of the article:
          NB: In the Endpoint Manager admin center, the policy shows an Error state even if the policy is applied successful.

          Seems that the GET part of the policy is not available in Windows and therefor Intune is not able to query the status of the setting.
          Have seen that before with other policies, which was confirmed by MS the GET part was missing. So I guess that`s the same for this setting.

          Reply
        • Erik on August 26, 2020 19:09

          I had this issue when applying the policy to the user group because I was adding it to the user group, and the signed-in user was a standard account. Once I changed it to the dynamic device group the policy applied correctly.

          Reply
      • CJ on January 26, 2022 03:02

        Got the same thing, you can dig in the event logs (google the remediation error) does not give a lot to work on. But you are right, the new local admin/password is created. I tested on a few different machines and it’s the same error.

        Sounds like Peter is on the right track. Thanks!

        Reply
    3. Quadri on April 20, 2020 04:11

      Hi Peter – This is awesome, thanks for the comprehensive post.

      Is there a way to set the account password to never expire? I’m currently having isssues where when I create the local admin account, and I try to login/elevate, it forces me to update the password, and also it doesn’t check the box “Password never expire”

      Thanks again

      Reply
      • Peter Klapwijk on April 25, 2020 09:27

        Hi,

        I`m not aware of a possibility to set the password to never expires.
        The account is targeted with the local password policy. You can target the machine wit a password policy, using a device restrictions profile, but there is no setting in that to set it to never expire.

        Reply
      • CHNed on February 10, 2021 11:48

        Use the following in PS-script. Succesfully tested this:

        Set-LocalUser -Name “ACCOUNT_NAME” -PasswordNeverExpires:$true

        Reply
    4. David Center on September 19, 2020 00:50

      Hi Peter! This is terrific. One question for you…

      Say you assign this policy to a device and the local admin account is created. Is it possible to reverse this policy and remove that account at a later date?

      Appreciate your thoughts/knowledge. Thanks!

      Reply
      • CJ on January 26, 2022 03:06

        Use a powershell script and can push it out to machines you specify via security group.

        Reply
    5. CHNed on February 10, 2021 11:49

      February 2021: still getting the ‘Remediation failed’ error message…

      Reply
      • DaSpug on February 28, 2021 14:52

        Same here…. I created a script to run to add a local account, give admin rights and set the password not to expire but that also fails to run (both in device context and user context – the latter because the user isn’t an admin).

        Reply
    6. Techie on October 6, 2021 14:10

      Hello All,
      I created the Local account – LocalUser, with the same steps as mentioned. It worked fine with the Admin rights but when I tried to change the name of the account, it did not appear with Admin rights. What wrong am I doing? Can someone please guide me?

      Reply
    7. Darren on July 13, 2022 16:20

      Hi Peter,
      Thank you for the guide – I’ve been using this successfully for some time now.

      As our requirements have now changed, for best practice I’d like to remove this account from all of our devices. How would I do this please?

      Reply
    8. Patrick on July 28, 2022 13:57

      I have just applied this policy (in a testing group) and waiting for it to replicate. I do have a question though that I hope someone can assist on. Does this only apply once? For example, our policies state that the local admin and guest accounts are disabled along with the the “backup” local admin account must have a unique password controlled by LAPS. Will this keep setting the password back to what is configured in the Intune Policy or does this only apply once so that LAPS can rotate the password every 30 days and store in AD?

      Reply
    9. Pallav on August 19, 2022 21:34

      I had configured the same in my infra, but after a few days, the account automatically gets removed from the Admin group even though I have specified the value”2″.

      Reply
      • King on September 21, 2022 13:28

        I get the same thing – it works, but have to run a sync every login for it to get into the admin group, not sure why this is happening.

        Reply
    10. Frank on October 6, 2022 17:27

      How is the password passed through from/to computer and Intune? Clear text, encrypted? How?
      Thanks.

      Reply
    11. Rod on December 12, 2022 16:44

      Hi
      It works fine when the HAADJ device is in Corporate LAN or though VPN. When syncing with Company Portal app from outside the localuser dows not appear. Is this expected?

      Reply
    12. unkown231 on December 23, 2022 16:00

      please share troubleshooting steps or flow of policy on windows 10 machine I am getting error like currently looged user (i have logged to the machine as standard user) policy is not applied intune portal says error

      Reply
    13. Patrick Maurer on January 30, 2023 12:05

      Hi Peter, What is the recommended method to change the local account password? Changing this password in the same profile will not change the password if the account already exists. PowerShell is not recommended and should be avoid using plain text in scripts or from command line.

      Please let me know what your recommendation is 🙂

      Reply
      • Joel Grimes on July 24, 2023 21:14

        Since this comment then have added Cloud LAPS. Works quite well. As long the user account has been created.

        Reply
    14. Steve Hathaway on March 22, 2023 20:30

      I am unable to get this configuration policy to apply successfully in any manner

      it shows setting status of Error, error code 0x87d1fde8

      Any help would be greatly appreciated

      Thank you,

      Reply
    15. Dave Smith on June 9, 2023 22:06

      Getting the same 0x87d1fde8 error. Wondering if this is affected by default security policies.

      Reply
    16. antoine on August 29, 2023 15:36

      Helo , that work for updating password for existing account ?

      Reply
    17. Terje Monsen on August 30, 2023 15:35

      This is outdated in 2023

      Reply
      • beazer on November 22, 2023 13:53

        You will get remediation errors and you have to run an additional script to set the password to “never expires”, but besides that it’s still working on current W11 build.

        Reply
      • Joe on January 8, 2024 10:50

        Why is this outdated? If there is a better method to create a local account on a device and add it to a specific group without using powershell remediation scripts, please share.

        Reply
    Leave A Reply Cancel Reply

    Peter Klapwijk

    Hi! Welcome to my blog post.
    I hope you enjoy reading my articles.

    Hit the About Me button to get in contact with me or leave a comment.

    Awards
    Sponsor
    Latest Posts

    Create deployment ring groups for Microsoft Intune

    June 27, 2025

    Update Windows Defender during Windows Autopilot enrollments

    May 16, 2025

    Hide the “Turn on an ad privacy feature” pop-up in Chrome with Microsoft Intune

    April 19, 2025

    How to set Google as default search provider with Microsoft Intune

    April 18, 2025
    follow me
    • Twitter 4.8K
    • LinkedIn 6.1K
    • YouTube
    • Bluesky 1.5K
    Tags
    Administrative Templates Android Automation Autopilot Azure Azure AD Browser Conditional Access Edge EMS Exchange Online Feitian FIDO2 Flow Google Chrome Graph Graph API Identity Management Intune Intune Monitoring iOS KIOSK Logic Apps macOS MEM MEMMonitoring Microsoft 365 Microsoft Edge Microsoft Endpoint Manager Modern Workplace Office 365 OneDrive for Business Outlook Passwordless PowerApps Power Automate Security SharePoint Online Teams Windows Windows 10 Windows10 Windows 11 Windows Autopilot Windows Update
    Copy right

    This information is provided “AS IS” with no warranties, confers no rights and is not supported by the authors, or In The Cloud 24-7.

     

    Copyright © 2025 by In The Cloud 24-7/ Peter Klapwijk. All rights reserved, No part of the information on this web site may be reproduced or posted in any form or by any means without the prior written permission of the publisher.

    Shorthand; Don’t pass off my work as yours, it’s not nice.

    Recent Comments
    • Parth Savjadiya on Using Visual Studio with Microsoft Endpoint Privilege Management, some notes
    • Chris Johnson on Assign Deny Local Log On user right to an (Azure) AD group by using Microsoft Intune
    • Northernsky on Automatically wipe a Windows 10 device after a number of authentication failures
    • Henrik on Intune Driver update for Windows – Get applicable devices
    • Adam on Get notified on expiring Azure App Registration client secrets
    most popular

    Application installation issues; Download pending

    October 1, 2024

    Restrict which users can logon into a Windows 10 device with Microsoft Intune

    April 11, 2020

    How to change the Windows 11 language with Intune

    November 11, 2022

    Update Microsoft Edge during Windows Autopilot enrollments

    July 9, 2024
    Peter Klapwijk – In The Cloud 24-7
    X (Twitter) LinkedIn YouTube RSS Bluesky
    © 2025 ThemeSphere. Designed by ThemeSphere.

    Type above and press Enter to search. Press Esc to cancel.

    Manage Cookie Consent
    To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
    Functional Always active
    The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
    Preferences
    The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
    Statistics
    The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
    Marketing
    The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
    Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
    View preferences
    {title} {title} {title}