1. Cosafe Support Center
  2. Integrations & Additional Services

User sync via SFTP

You can read more about how SFTP sync works here.

Advantages of SFTP sync

If you have many users, SFTP sync is a good solution to ensure that the user register in Cosafe is updated daily. User sync via SFTP means that customers can provide their user, group and account information in a CSV (Comma-Separated Values) file that Cosafe securely retrieves daily via SFTP, thereby automatically adding, editing, deleting the information in Cosafe.

+ Quick and easy set up (Cosafe sets up SFTP and customer uploads CSV file with desired information).

+ Increased flexibility compared to direct synchronization with the customer's AD.

+ Can be combined with data from different AD sources (e.g.. if subsidiaries within a group of companies or administrations within a municipality use different Active Directory solutions)
+ Can combine data from different fields in the customer's AD if a user is to belong to different accounts (e.g., if the user is a member of a group of companies). a regional manager responsible for several offices or a mother tongue teacher working in several schools).

+ Cost-effective

+ Secure transfer of personal data and in compliance with GDPR regulations

How does SFTP sync work?

Cosafe provides an SFTP server where the customer uploads a CSV file for secure synchronization of user information once a day (night time). The system automatically sends an email to the selected administrator with information about the changes made during the synchronization.

How is the set made?

1. Email your order to support@cosafe.se


We activate the Group ID field in the Cosafe admin panel 

You can easily assign your users to each account by entering the group affiliation for each user in the "Groups" column of the CSV file.

Start by creating at least one group in the admin panel and add a Group ID. This Group ID can be e.g. the name of the department or unit to which the user belongs in your AD. The group ID must then be entered in the "Groups" column of the CSV file for each user.

You can choose to sync the users to several different groups in the account or only one and then let the administrators manually add the users to several groups. Note that for the users to be synced to the right group in the right account, the Group ID you have assigned in the admin panel and in the CSV file must be exactly the same.

Is it possible to add a user to multiple accounts/sub-accounts?
Of course! If a user is to be added to multiple accounts, enter multiple Group IDs in the "Groups" column for that user. Example: "Scranton branch, Akron Branch", note that the Group ID should be separated by commas.

Is it possible to import users without entering the Group ID, and allocate the users manually to the groups?
That's fine too, of course! Some customers prefer to have one CSV file per account.
Export the users to separate CSV files based on which accounts they should be in. If you choose to use separate files per account, there is no need to enter a Group ID in the file. Each file is linked to the respective account and your administrator can easily manually allocate users to the right groups.

Example of where to enter the Group ID in the admin panel and in the CSV file:

 


b) Do you want automatic or manual email invitations to users?

 

Let Cosafe know if you want the registration email invitation to be sent automatically or manually to new users being added. (We recommend to initially use manual invitation to enable gradual roll-out to selected users)

 

2. Access to the SFTP server

a) Who in your company should access the Cosafe SFTP server so we can send login details through a secure channel?

b) From which IP address will you connect to the SFTP server?

3. Export the files and upload to the server

Cosafe will tell you what the name of the file should be, then you will get back to us when the CSV file(s) are uploaded. Please note that the name of the file cannot be changed after setup, only the content.


4. Enable sync

We will let you know if the file is OK or if adjustments need to be made. You then give the go-ahead to activate the sync.

 

a) To which e-mail address would you like us to send the daily report on sync results?

 

When sync is enabled, Cosafe retrieves user information every day and sends a report to the specified email about the import result. The import report is also available in the Admin Panel under Users > Import Users > AD Import History.


5. Invite your users and enjoy simplified administration!

Fields in the file

UniqueID(Mandatory)

Consists of 10-256 characters (letters, numbers and symbols). Must be unique for each user.

Name (Obligatory)

Text field with first and last name

Mail (Obligatory)

User's email address

Title (Optional)

The user's title.

TelephoneNumber (optional)

Primary phone number of the user. Used for two-step verification or in the call-in function. (Indicated in country code, e.g. +46)

SecondaryTelephoneNumber (Optional)

Optional to enter and displayed in the user's profile. Note that the secondary phone number must be included in the file if it is to appear in the user's profile.

TimeStamp (Optional)

Time stamp on when the data was exported.

Groups (Optional)

Specifies whether to sync users directly to one or more groups. The groups can be created in the admin panel already or created in connection with the file.

Skip (Optional)

Used if any of the users are not to be imported. Enter '1' in the column for the user(s) not to be imported, otherwise the field is left empty.

FirstName (Optional)

Used in exceptions depending on configuration requirements when exporting data. In this case, replaces the 'Name' field.

LastName (Optional)

Used in exceptions depending on configuration requirements when exporting data. In this case, replaces the 'Name' field.

Use our sample template: CSV sample template

 

Questions and answers:

In general

1. We prefer to use our own SFTP solution, is that possible?

Cosafe normally provides SFTP and login credentials for an efficient and standardized setup. If you would prefer to use your own SFTP solution, this is OK, but it may be associated with higher implementation costs and longer lead times due to non-standard solutions that require contacts with your IT department.

2. We are a large organization with 2000 users in 50 sub-accounts. How should we create an appropriate structure?

If you are unsure, you can raise the issue during your onboarding or you can request a workshop with your managers. But normally a structure looks as follows:

Level

What?

Who should be the users?

1. Main account

Name of the organization (e.g. Municipality A or Group B)

Administrators for the entire Cosafe structure and management staff

2. Sub-account

The respective department in your organization. e.g. Administration A, School B, Subsidiary C or Local Office D.

All users that should belong to the department (sub-account) and normally a designated admin.

3. Main group
(for everyone in the account)

All staff in the sub-account

All users in the sub-account.

4. Group
(for selected members of the account)

Selected groups that suit your organization e.g. Management team, Team A, School management, Caretaker, etc.

Users from the sub-account who should be able to communicate with the rest of the group.

About users and groups

1. What happens to manually created users on the first SFTP sync?

If the user is manually created in the admin panel, but not in the CSV file, the user will not be affected by the sync.

If the manually created user's email address exists in the CSV file, the user will be replaced according to the CSV file's user information during the next sync. This means that after the first sync, the user will have to create a password and log in again, but only once, i.e. after the first sync.

2. Can you add users manually when using SFTP sync?

Yes, it is possible to create a user manually in the admin panel without affecting the daily sync provided that the user's email address does not exist in the current CSV file.

So you can manually add a temporary employee or consultant to an account even if they are not in your Active Directory.

3. Is it possible to create a group manually in the Admin Panel even if you have group sync?

Yes, provided that the manually created group is not given a Group ID. This is because if the Group ID is missing, the group will be ignored by the sync. The users added to the group will remain after synchronization provided that the users belong to the same account that the group was created in.

5. Can you manually add groups to a user who automatically belongs to a group in the account via sync?

Yes, it is.

About fields in the csv file

1. Is it possible to use email address as "UniqueID" in the CSV file?

Yes, that's fine. Normally, one uses e.g. employment number and to enable the change of e-mail address without affecting the user. If the email address is changed in the future, the entire user must be replaced.

2. Is it possible to exclude users in sync?

Yes, there is a field in the file where you can specify which data/information to exclude. It can be used if one or more users should not be imported into the Cosafe platform, but the data is in the file.

3. What happens if a user adds a secondary phone number to the app, which is then not in the file?
The phone number will then be deleted during the synchronization process. If there is to be a secondary telephone number, it needs to be added under the field "SecondaryTelephoneNumber" in the CSV file.

About the SFTP server and other sources of information

Is it possible to combine data from different sources if the organization uses different systems?

Yes, it is. You can retrieve information from different systems/sources and export it to the CSV file that Cosafe then retrieves from. This is usually appreciated by customers because it is more flexible if you have data stored in different systems and it can be difficult to gather the information in your AD.

About character encoding for file transfer

What character encoding should the file be converted to?
The file should be converted to UTF-8 or UTF-16 to be compatible with all systems and represent all languages and symbols correctly.