We are trying to create a local admin user other than the auto pilot user in Intune. The way we have setup is our auto pilot user (Domain user account) is an admin user and then we are using CSP to create another local admin user. We are using hybrid mode enrollment.
We have a Device configuration profile with OMA URI as follows:
OMA-URI: ./Device/Vendor/MSFT/Accounts/Users/admin1/Password
Data Type: String
Value: ***
OMA-URI: ./Device/Vendor/MSFT/Accounts/Users/admin1/LocalUserGroup: 2
Data Type: Integer
Value: 2
Assignment : User Group
When it Works:
So far based on testing it works when the profile is assigned to the Dynamic device group which is created to perform auto pilot on intune machines for which the device hash is already imported, but in this process it fails to make the auto pilot user as an admin
When it doesn't work:
When the configuration profile is applied to user group, it fails to create the user, but then the auto pilot user is created properly with admin rights.
Variations tried:
Making the localadmin user as a non admin by changing the integer value to 1 and then first tried with dynamic device group assigned, which failed and also the user group which also failed.
Client machine Windows version: Windows 10 21H2
Would like to avoid the PowerShell script method if possible. Kindly let me know if you require any further details.
