Setup Guide

Identity Import by CSV file plugin

Memority's CSV connector can import identities from a CSV file stored on the SFTP storage of the tenant. Some prerequisites must be met on the file and on the tenant before the import runs.

This page explains how the CSV identity import works in Memority and the prerequisites required to import identities from a CSV file.

Definitions

What objects can be imported ?

The connector imports identities of one identity type. Each row of the file is one identity.

To import organizations, use the CSV Organization Import plugin.

Where is the CSV file read from ?

From the SFTP storage of the tenant, or from the portal. You upload the file to a folder of the SFTP storage that depends on the identity type, or you upload it directly in the portal when you run the import task.

Are identities missing from the file deactivated ?

No. The import only creates and updates identities. An identity that is missing from the file does not change. To deactivate an identity, fill its endDate column.

A file can therefore contain all identities, or only some of them (for example, new joiners only).

Can Memority write back to the CSV file ?

No. The connector only imports identities into Memority. After each run, the file is archived and an error report is produced.

Memority CSV connector

File prerequisites

ID

Prerequisite

FILE1

The file uses ; as the separator.

FILE2

The file is encoded in UTF-8.

FILE3

The first row of the file is a header row with the column names.

FILE4

On the SFTP storage, the file has the name entered in the plugin form and it is in the folder memority_import/<identityType>/.

FILE5

No value contains a line break, even inside quotes.

A sample file shows the expected columns and formats. The plugin generates it in the project (_sample-import-csv-<identityType>.csv), and you can also download it from the portal, on the import task.

Data prerequisites

ID

Prerequisite

DATA1

Every row has an email. The email is the unique key of the identity.

DATA2

An email matches at most one identity of the identity type on the tenant.

DATA3

The organization column holds the code (organizationCode) of an organization that already exists on the tenant.

DATA4

The manager column holds the email of an identity of the same identity type, in the same file or already on the tenant.

DATA5

Dates use the format yyyy-MM-dd.

CSV Identity Import plugin

Memority provides a plugin in the MIT Plugin Store that configures the CSV identity import. The plugin generates all the configuration files that your tenant needs.

Prerequisites

In addition to the common plugin prerequisites, this plugin requires:


Prerequisite

Description

1

Existing identity type

The plugin imports identities into an identity type that must already exist (for example internal). It does not create the identity type. You can create it with the New Identity Type plugin, or manually.

2

Existing organizations

Only required to fill the organization column. The organizations must exist on the tenant before the import. You can import them first with the CSV Organization Import plugin.

Installation

The plugin is installed with the standard procedure described on the Memority Plugins page. This section only gives the information that is specific to the CSV Identity Import plugin.

Installation mode: repeatable with distinct values. You can install the plugin once per identity type: each installation requires a different identity type.

Plugin form parameters

All four fields are mandatory and have no default value.


Parameter

Description

Example

1

Import name (FR)

Name of the import task in the portal, in French. 2 to 100 characters.

Import RH

2

Import name (EN)

Name of the import task in the portal, in English. 2 to 100 characters.

HR import

3

Identity type

Identifier of the existing identity type that receives the imported identities. It starts with a lowercase letter, followed by letters or digits (for example mySupport). Other characters, such as hyphens or underscores, are not supported.

internal

4

CSV file name

Name of the CSV file to import. Letters, digits, _ and -, with the .csv extension.

users.csv

Secrets

The plugin needs no secret: the import reads the SFTP storage of the tenant. Step 7 of the standard procedure does not apply.

Data import

The plugin generates no data to import. Step 10 of the standard procedure does not apply.

The plugin also generates a sample file, _sample-import-csv-<identityType>.csv, in the data folder of the project. It shows the expected columns and formats. Do not push it to the tenant: it is not an import file.

What does it do ?

The generated configuration works out of the box, but it may need adjustments for specific client needs.

The plugin generates the complete configuration required for a CSV identity import in just a few clicks.

It reads a CSV file from the SFTP storage of the tenant, then creates and updates the identities of one identity type. At the end of each run, it archives the file, produces an error report and sends it by email to the user who ran the task.

The plugin supports:

  • Creation and update of identities. The import never creates duplicates: you can run it again with the same file or with a new file.

  • Matching on the email. Matching with existing identities is case-insensitive, and limited to the identity type of the plugin.

  • Manager resolution in one run. The rows can be in any order: the import creates the managers before the identities they manage.

  • Organization check. The organization of each row must exist, and it must be in the scope of the user who runs the task.

  • Error report and email notification after each run.

  • Manual run. By default, the task runs only when you start it. You can schedule it afterwards.

Imported data reference

CSV column

Required

Memority attribute

Notes

firstName

Yes

firstName

First name

lastName

Yes

lastName

Last name

email

Yes

email

Unique key of the identity. Stored in lower case. Matching is case-insensitive.

organization

No

organization

Code (organizationCode) of an existing organization

manager

No

manager

Email of the manager. The manager must be an identity of the same type, in the same file or already on the tenant.

startDate

No

activationFrom

First active day, format yyyy-MM-dd. Converted to midnight in the tenant time zone.

endDate

No

activationUntil

Last active day, format yyyy-MM-dd. The identity is deactivated at the end of this day (endDate + 1 day, at midnight in the tenant time zone). Empty: no end date. If the identity had one, it is removed and the identity is active again.

Example:

firstName;lastName;email;organization;manager;startDate;endDate
John;Doe;john.doe@company.com;IT;jane.smith@company.com;2024-01-15;2025-12-31
Jane;Smith;jane.smith@company.com;HR;;2023-06-01;

Organization scope

The organization of a row must be the security organization of the user who runs the task, or an organization below it. Otherwise the row is rejected.

When the user has no security organization, or when the task runs on a schedule, the import only checks that the organization exists.

Running an import

  1. Upload the CSV file in one of these ways:

    • to the SFTP storage of the tenant, in the folder memority_import/<identityType>/, with the file name entered in the plugin form;

    • directly in the portal, when you run the task (step 2).

  2. In the portal, go to Administration → Import tasks, select the task and run it.

  3. At the end of the run, you receive an email with the error report.

After the run, the files are in these folders:

File

Folder

Imported file, archived

memority_import/<identityType>/archive/

Error report

memority_import/<identityType>/report/

The error report lists the rejected rows with an error code, a label, a description, details and a date.

Behavior by case

Case

Result

The email is not on the tenant

The identity is created.

The email matches one identity of the type

The identity is updated.

The email matches several identities of the type

The row is rejected and listed in the error report.

The row has no email

The row is rejected and listed in the error report. The other rows are imported.

The organization code is unknown

The row is rejected and listed in the error report.

The organization is outside the scope of the user who runs the task

The row is rejected and listed in the error report.

The manager email is unknown

The identity is created or updated without a manager.

An identity of the type is missing from the file

Nothing changes: the identity stays active.

Technical details

<identityType> in the generated file names is replaced by the Identity type entered in the plugin form.

Generated files

File

Path

Description

import-csv-<identityType>-connector.xml

im/sync/src/main/resources/ConnectorDefinition/Plugins/ImportCsv/

CSV connector: file path, separator, encoding

import-csv-<identityType>-application.xml

im/sync/src/main/resources/Application/Plugins/ImportCsv/

Mapping of the columns, matching rules and reactions

import-csv-<identityType>-syncTask.xml

im/sync/src/main/resources/SynchronizationTaskDefinition/Plugins/ImportCsv/

Import task

import-csv-<identityType>-syncPostProcessing.xml

im/sync/src/main/resources/SynchronizationTaskPostProcessingDefinition/Plugins/ImportCsv/

File archive, error report and email notification

_sample-import-csv-<identityType>.csv

im/idm/src/main/data/Plugins/ImportCsv/

Sample CSV file. It is not deployed.

Updated files

File

Path

Description

_citadel-i18n_export.xml

shared/i18n/src/main/resources/

Adds the name of the import task, in French and English

report-sync-taskDefinitions.xml

im/idm/src/main/resources/ReferenceTable/

Adds the import task to the filter of the import reports

Troubleshooting

For issues with the Plugin Store itself (plugin not found, installation error), see the troubleshooting section of the Memority Plugins page.

The whole file fails and no row is imported

  • Cause: The file does not meet the file prerequisites (FILE1 to FILE5), so the CSV connector cannot read it.

  • Fix: Correct the file, then run the import again.

Rows are rejected with an unknown organization

  • Cause: The organization column holds a value that is not the organizationCode of an existing organization. A frequent mistake is to use the technical identifier of the organization instead of its code.

  • Fix: Use the organization code, or import the organizations first with the CSV Organization Import plugin.

Rows are rejected because the organization is outside the scope of the requester

  • Cause: The user who runs the task has a security organization, and the organization of the row is not this organization or below it.

  • Fix: Run the task with a user whose security organization covers the organizations of the file.

Identities are imported without a manager

  • Cause: The manager email does not match any identity of the same identity type. Or the configuration of the import task was changed to add write thresholds (idmWriteOperationsThresholdDefinition): the plugin generates the task without them. With write thresholds, all the rows are processed before any identity is written, so the managers created by the same file do not exist yet.

  • Fix: Check the email of the manager. If write thresholds were added, remove them from the import task file (import-csv-<identityType>-syncTask.xml) and deploy the configuration again. A second run of the same file also fills the managers.

Rows are rejected because several identities match

  • Cause: Several identities of the identity type have the same email on the tenant.

  • Fix: Correct the email in the file, or remove the duplicates on the tenant, then run the import again.