Add AzureAD user to local administrator group

Andreas 1,331 Reputation points
2021-03-09T08:12:55.867+00:00

Hi,

I want to add a AzureAD user to local administrator group of the devices that are managed with Intune.
I have been looking at "https://learn.microsoft.com/en-us/windows/client-management/mdm/policy-csp-localusersandgroups"
This works, but I have a challenge.

This xml setting here is ok if I use machines that have English setup, but we also have other machines with other language settings, and then the Administrators are not called Administrators.

<accessgroup desc="Administrators">

I can of course figure out which machines have English and not English, and create device groups for this, but this is time consuming. Is there another way to solve this ? I cannot create two OMA-URI in the same profile, but then it will conflict.

Thanks for reply

/R
Andy

Microsoft Security Intune Configuration
Microsoft Security Intune Other
0 comments No comments
{count} votes

Accepted answer
  1. Crystal-MSFT 53,981 Reputation points Microsoft External Staff
    2021-03-10T01:38:26.817+00:00

    @Andreas , From your description, we find some devices are unable to apply the policy to add the Azure AD user into local administrators group. Because of the display name of administrators group is not the same on the non English devices. Agree with Jason, we can change to use group SID which is unique. For local administrators group, the SID is S-1-5-32-544. We can see more details in the following link:
    https://learn.microsoft.com/en-US/troubleshoot/windows-server/identity/security-identifiers-in-windows

    We can change the accessgroup value as "<accessgroup desc = "S-1-5-32-544">" to see if it is working.

    Hope it can help.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Jason Sandys 31,406 Reputation points Microsoft Employee Moderator
    2021-03-09T15:52:54.947+00:00

    You should be able to use the well-known SID. See https://www.jeffgilb.com/managing-local-administrators-with-azure-ad-and-intune/ for lots a details including using a SID.

    1 person found this answer helpful.

  2. Andreas 1,331 Reputation points
    2021-03-09T16:40:34.01+00:00

    Hi,

    Thanks for the answer, but I don`t have any problem adding the users. The problem is the naming of the local Administrator group.
    If the language is not English then the xml settings needs to change, because if fails when its looking for Administrators group.

    Comments ?

    /R
    andy


  3. Andreas 1,331 Reputation points
    2021-03-10T08:23:39.767+00:00

    Hi,

    Thanks guys, the SID for the group made it work.

    /R
    Andy


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.