How to import AD group memberships as manual rights
This guide explains how to import existing user memberships from an Active Directory (AD) group into eADM as manual rights.
This process is useful for managing access that was originally granted through AD groups before eADM was implemented. By converting these memberships to manual rights, support staff and managers can add or remove access for individual users directly within the eADM interface.
Förfarande
The process involves three main stages:
Find the
sAMAkontonamn
of the AD group in eADM.Export the group members from AD using a PowerShell script.
Assign the right to the exported users in eADM.
1. Find the group's sAMAccountName
First, you need to find the unique identifier (sAMAkontonamn
) for the group that manages the right.
In eADM, navigate to the Access control module for the relevant system (e.g., Microsoft).
Go to the Rights tab.
Click on the group name associated with the right you want to import. In the example below, we are looking for the group linked to the "Microsoft E3" right. 4. On the group's page, select the Foundation data tab.
Locate the Namn field. The value in this field is the group's
sAMAkontonamn
, which you will need for the next step.
2. Export group members from Active Directory
Next, use PowerShell on a server with the Active Directory module installed to create a list of the group's members.
Open PowerShell.
Copy and paste the script below into the PowerShell console.
Replace
"11735-GS-Msol-SPE_E3"
with thesAMAkontonamn
you found in the previous step.KODPowerShell
KOD# 1. Define the AD group's sAMAccountName $identity = "11735-GS-Msol-SPE_E3" # 2. Define the output file path $filePath = "C:\temp\members-$($identity).csv" # 3. Get group members, retrieve their employeeNumber, and save to the file Get-ADGroupMember -Identity $identity | ` Get-ADUser -Properties employeeNumber | ` Select-Object -ExpandProperty employeeNumber | ` Out-File -FilePath $filePath -Encoding UTF8 Write-Host "Export complete. File saved to: $filePath"
Obs! This script exports the anställdNummer
for each user. If your organization uses a different identifier (like userPrincipalName
), modify the -Properties
och Select-Object
parts of the script accordingly.
Run the script. It will create a CSV file (e.g.,
C:\temp\members-11735-GS-Msol-SPE_E3.csv
) containing a list of user IDs.Open the file and verify that it contains the correct list of identifiers.
3. Assign rights in eADM
Finally, use the exported list to assign the right to the users in eADM.
In the eADM left-hand menu, navigate to Assign rights.
Click the Provide identifiers button.
Select the identifier type that matches the data in your CSV file (e.g., Employee number).
Open your CSV file, copy all the identifiers, and paste them into the text box.
Click Add and verify that the correct users appear in the selection list.
Klicka på Fortsätt.
Select the right you want to assign to these users (e.g., Microsoft E3).
Follow the prompts and click Continue until you see a confirmation that the rights have been successfully assigned.
The process is now complete. The users from the AD group now have the corresponding right assigned manually in eADM.