0 votes

I have a third-party provider that is asking us for the Name,Phone,Email,Job Title, & Office of every new hire we get sent tot hem in a .CSV file at the end of the week so they can import them into thier software.

If we have a file at c:\user.csv is there a script that we could use that would append that file each time we add a new user?

Thank you,

by (1.3k points)
0

Hello,

Unfortunately, there is no such script. However, we can write it for you. It will be executed in a Business Rule triggering After creating a user and append the necessary data into the CSV file. If the solution meets your needs, please, provide us with a sample of the CSV file, clarify the LDAP names of user attributes whose values should be appended to the file and the corresponding column names where the values should be added. Then we will provide you with the script and detailed instructions.

For your information, if you have multiple instances of Adaxes service that share common configuration, the file should be stored in a network share folder. This way, each instance of Adaxes service will be able to write updates into the same file instead of into the separate local ones.

0

Sample of the CSV CSV.PNG

CSV = Active Directory Attribute Name = cn Phone = telephoneNumber Email = mail Job Title = title Office = physicalDeliveryOfficeName

File Location would be on a network. \server\folder\sms.csv

Let me know if there is anything I missed or anything else you may need.

1 Answer

0 votes
by (216k points)

Hello,

Thank you for the provided details. To create the Business Rule:

  1. Launch Adaxes Administration Console.
  2. In the Console Tree, right-click your service node.
  3. In the context menu, navigate to New and click Business Rule. image.png
  4. On step 2 of the Create Business Rule wizard, select the User object type.
  5. Select After crating a user and click Next. image.png
  6. Click Add an action.
  7. Select Run a program or PowerShell script.
  8. Paste the below script into the Script field. In the script:
  • $path – Specifies the path to the CSV file.
  • $properties – Specifies a map of CSV column names to the value references of corresponding properties.
$path = "\\server\share\users.csv" # TODO: modify me
$properties = [ordered]@{
    "Name"= "%cn%";
    "Phone" = "%telephoneNumber%";
    "Email" = "%mail%";
    "Job Title" = "%title%";
    "Office" = "%physicalDeliveryOfficeName%"
} # TODO: modify me

New-Object PSObject -Property $properties | Export-Csv -Path $path -Append -NoTypeInformation
  1. Enter a short description and click OK. image.png
  2. Click Next and finish creating the rule.

Related questions

0 votes
1 answer

hello i'm new with Adaxes i'm try to creat schuadle task to import a spefice user list by thier username id after that just update City for them by bulk updating . kinly advise

asked Aug 29, 2023 by sudox (20 points)
0 votes
1 answer

Hi, I would like to add a CSV file during my group creation form and add users from CSV to new created group. However the CSV file is converted into Binary file and I am ... help is really appreciated. Thanks! PS: What I tried so far and error message I got

asked Jul 3, 2023 by wintec01 (1.1k points)
0 votes
1 answer

Hello, Similar to exporting the members of a group to a csv file: https://www.adaxes.com/script-repository/export-group-members-to-csv-file-s184.htm I am looking to ... would like to include the memberof csv report in the email as well. Thanks in advance!

asked Feb 7, 2023 by JonnyBGood (20 points)
0 votes
1 answer

I am using this script modified for my testing. Import-Module Adaxes $csvFilePath = "D:\TestFeed\ImportNewUsers.csv" # Path to pick up feed file $userIdColumn = "Employee Number" # TODO: ... initial. I would like to add a 2 for now if the sam isn't unique.

asked Oct 17, 2022 by mightycabal (1.0k points)
0 votes
1 answer

So I need to export a list of all user's Line URI's to a CSV file. Running Adaxes 2021 Version 3.14.18804.0 (64 bit) and Teams Powershell 4.1.0 ... a Microsoft 365 account } finally { # Close the connection and release resources Disconnect-MicrosoftTeams }

asked Aug 4, 2022 by TheLexicon (200 points)
3,326 questions
3,026 answers
7,727 comments
544,682 users