English (EN)
العربيةThis Article provides a comprehensive guide for enterprise administrators to export user data as a UTF-8 encoded CSV file from a local Microsoft Active Directory (AD) or openLDAP directory, for subsequent data synchronization between Beem Portal and the on-premises directory.
System Requirements
- Microsoft AD Environment (Windows)
- Runtime: Windows PowerShell 5.1 or later (Windows Terminal recommended). Must run as Domain Admin / AD Read-Only Administrator.
- Component Dependency: Remote Server Administration Tools (RSAT) – AD PowerShell Module must be installed.
- Verification: Run Get-Command Get-ADUser in PowerShell. If command details are returned, the module is installed.
- If "command not found" appears: Install RSAT: Active Directory Domain Services and Lightweight Directory Services Tools via Settings → Apps → Optional Features → Add a feature.
- Permissions & Network: The machine running the script must reach the AD Domain Controller; the account must have permission to read user attributes under the target OU.
- OpenLDAP Environment (Linux / macOS)
- Runtime: Terminal, with network connectivity to the openLDAP server.
- Tool Dependencies:
ldapsearch:- Linux (CentOS/RHEL):
yum install openldap-clients - Linux (Ubuntu/Debian):
apt install ldap-utils - macOS:
brew install openldap
- Linux (CentOS/RHEL):
- Python 3.6 or later: verify with
python3 --version.
- Permissions: The binding account (
-Dparameter) must have read-only access to user attributes in the target LDAP directory tree.
Workflow for Microsoft AD Data Export (Windows PowerShell)
Get to PowerShell
- Press
Win + X, select Windows PowerShell (Admin) (Windows 11: Terminal (Admin)). - Confirm the UAC prompt.
- Recommend: Run cd C:\Users\Administrator\Desktop to set the output directory to the Desktop for easy file access.
- Press
Copy and Paste the script from Beem Portal to PowerShell
- Back in Beem Portal. Select the Microsoft AD tab to differentiate the data structure.
- Copy the Script Command
- Paste the script to PowerShell and replace the following parameters with the organization's own directory parameter.
| Configuration Item | Script Location | Example Value | Description |
|---|---|---|---|
| Search Base | -SearchBase "OU=TestAgents,DC=alpha,DC=ad" | OU=Sales,DC=company,DC=com | Replace with your actual AD Organizational Unit (OU) path to export the entire domain, use DC=company,DC=com. |
| Output File Path/Name | Export-Csv aaa.csv ... | C:\Users\Admin\Desktop\ad_users.csv | Use an absolute path; file extension must be .csv. |
- Press enter, run the script
- Success: No red errors, returns prompt.
- Upload the exported CSV to Beem Portal
- Locate the csv file at the configured path.
- Upload the file back to Beem Portal and click Import.
Workflow for openLDAP Data Export (Linux / macOS Terminal)
Open Terminal & Verify Dependencies
Launch Terminal: Linux
(Ctrl+Alt+T), macOS (Launchpad → Terminal).Verify tools:
ldapsearch -Vpython3 --version
Copy and Paste the script from Beem Portal to Linux / Terminal
- Back in Beem Portal. Select the OpenLDAP tab to differentiate the data structure.
- Copy the Script Command
- Paste the script to Linux / Terminal and replace the following parameters with the organization's own directory parameter.
| Configuration Item | Script Location | Example Value | Description |
|---|---|---|---|
| LDAP Server URL | -H ldap://10.209.204.200:389 | ldap://192.168.1.100:389 | Replace with your openLDAP IP:Port. |
| Bind Account DN | -D "cn=admin,dc=alpha,dc=ad" | cn=ldap_reader,dc=company,dc=com | Use a read-only bind DN; avoid admin accounts. |
| Search Base DN | -b "dc=alpha,dc=ad" | ou=HR,dc=company,dc=com | Base DN where target users are stored. |
| Output File Path/Name | open("export_users.csv", ...) | ~/Desktop/openldap_users.csv | Use an absolute path; file extension must be .csv. |
- Input the password. (It would be automatically set as invisible.) Press enter to run.
- Success: No red errors, returns prompt.
- Upload the exported CSV to Beem Portal
- Locate the csv file at the configured path.
- Upload the file back to Beem Portal and click Import.

