Import users from Active Directory

Administrators can import users and groups from Active Directory using a .csv file.

Following steps illustrate how administrators can create valid .csv files and import them to the ForcepointNeo cloud portal.

Steps

  1. To create the .csv files run the following scripts in PowerShell with administrator permissions. Use of PowerShell7 or higher is recommended.

    Export Active-Directory users script:

    Get-ADUser -Filter * -Properties * | Select -Property GivenName,
     sn, title, physicalDeliveryOfficeName, streetAddress, l, st, 
    postalCode, c, mobile, mail, department, userPrincipalName, 
    ObjectSid, sAMAccountName, distinguishedName, 
    @{Name="ManagerEmail";Expression={(get-aduser -property 
    emailaddress $_.manager).emailaddress}}, 
    @{n="ManagerName";e={get-aduser $_.manager | select -
    ExpandProperty name}} | export-csv -path c:\temp\userexport.csv -
    NoTypeInformation -Encoding UTF8

    Export Active-Directory groups script:

    Get-ADGroup -Filter 'GroupCategory -eq "Security"' -Properties * 
    | Select -Property objectSid, distinguishedName, name | 
    Export-Csv -Path C:\temp\groupexport.csv -NoTypeInformation -Encoding UTF8

    Open the exported files using Notepad++, click on Encoding and ensure that UTF-8 is checked.

  2. Log in to Forcepoint Neo cloud portal and navigate to the Policy view.
  3. Click on the drawer button on the right top corner.

  4. On the Resources page that displays, choose between Users or Groups tabs to view the existing lists and also upload CSV file containing Active Directory user or group information.
  5. For users, select the Users tab:

    1. To upload users from a .csv file, click on Users tab and then click on Import users button and then browse to select the .csv file.

      Post successful file upload, the following screen will be displayed:

    2. For groups, select the Groups tab:

      To upload the groups .csv file, click on Groups tab and then click on Import groups button and then browse to select the .csv file.

      Post successful file upload, the following screen will be displayed:

Success with errors

If the .csv file contains items with missing mandatory fields then following error will be displayed. By clicking Download File you can view the list of items with errors which failed during import.

Error

If the .csv file entries have issues:

  • Case 1- All items in file are missing mandatory fields
  • Case 2 – File format is not valid
  • Case 3 – File encoding is different from utf-8

Mandatory fields: Ensure to include the mandatory fields necessary.

  • Users
    • - userPrincipalName
    • - objectSid
  • Groups
    • - Group name
    • - objectSid