# Fetch From URL

### Overview

MangoApps allows administrators to synchronize users from a .csv file residing on a Secure FTP Server (SFTP Server). This feature facilitates user addition and removal in MangoApps based on external data sources.

***

### Synchronizing Users

Click the toggle bar for **Synchronize Users** to enable user synchronization from an SFTP server. Users imported via **Admin Portal > Users > Add Users > Fetch From URL** are assigned the **Network User** role, regardless of their email domain.

<figure><img src="https://1733114811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lclpq021Ai9jH1_X4gO%2Fuploads%2FVo063PCbyxjbGMrE5K9J%2Faegesw.png?alt=media&#x26;token=cbc5972b-35a7-43bc-8cbd-15b8bedbbf5f" alt="" width="563"><figcaption></figcaption></figure>

**Enter the CSV File URL**

Provide the absolute path of the .csv file residing on the SFTP server for successful data fetching.

Click **Download sample CSV** to get a sample file to preview how your CSV should be structured. Do **not** modify the field names in the first row to avoid mapping errors.

***

**Users Photos File URL**

The "Users Photos File URL" section allows for the upload of user profile images via `.zip` file containing `.jpg`, `.jpeg`, or `.png` images—named exactly as specified in the User.csv file—in the same SFTP location as the User.csv.

The file **must** be in `.zip` format.

Each image file name **must** exactly match the value specified in the `profile image` column of the accompanying `User.csv` file.

**Example:**\
If a user has `123.jpg` listed as their profile image in `User.csv`, the `.zip` file **must** include an image named `123.jpg`.

***

**When Fetched Users Already Exist in MangoApps**

* Select **Skip existing users** to retain current data.
* Select **Update existing users** to overwrite existing data.

**Email Invites for Newly Added Users**

* Mark the checkbox to send login credentials via email to new users.

***

### **Configure Authentication**

Configure the Authentication options. This is optional.

* In the **Login ID**, enter the login ID for the SFTP server for authentication when MangoApps tries to sync data from the .csv file.
* In the **Password**, enter the password for the SFTP server for authentication when MangoApps tries to sync data from the .csv file.
* In the **AES-256 Decryption Key**, enter the decryption key for the .csv file if you have encrypted the file with AES-256 Encryption for increased security.

***

### **Set Sync Schedule**

Select preferred the sync schedule from the drop-down.

* Select the ***Once Every Day*** option to automatically sync users from the .csv file once in 24 hours. **OR**
* Select ***Every 12 Hours*** option to automatically sync users from the .csv file every 12 hours.

**Save & Sync**

* Click **Save Settings** to apply configurations and test the SFTP server connection.
* Click **Save Settings & Force Sync Now** to immediately synchronize users.

A confirmation message will appear upon successful sync.

***

### **Admin Notifications**

After a successful sync, the system sends an email to the network admin who initiated the sync. Additional users can be added to this email chain by marking the check box next to **Additionally send messages to specific users when fetch cycle us completed.** A user look ahead field will appear for user search.

***

### Synchronizing Groups & Memberships

Click the **toggle bar** for Synchronize Groups to enable synchronization of groups and group memberships data from a .csv file residing on a server.

<figure><img src="https://1733114811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lclpq021Ai9jH1_X4gO%2Fuploads%2F4zzJJLFo9DDPaiRxWtE7%2Fsrhsr.png?alt=media&#x26;token=ef650562-8d34-449b-b020-72161bb5971d" alt="" width="563"><figcaption></figcaption></figure>

To enable group and membership synchronization from a CSV file on a server:

1. **Enable Synchronization**
   * Click the **Synchronize Groups** toggle to turn on group and membership synchronization.
2. **Specify the File Locations**
   * In the **Group CSV URL** field, enter the absolute URL of the CSV file containing group data.
   * In the **Group Membership CSV URL** field, enter the absolute URL of the CSV file containing group membership data.

{% hint style="danger" %}
Ensure you provide the full absolute path to each file for successful data retrieval.
{% endhint %}

***

#### Configure Group Membership Options

Choose one of the following options to manage group memberships based on the CSV file:

* **Match exactly with the CSV:** This option overwrites existing group memberships to match the CSV file *exactly*. It adds new members and removes any not listed in the CSV.
* **Add new members only:** This option adds new members from the CSV without removing any existing members. The current group memberships remain unchanged.
* **Match with the CSV but retain manually added members:** This option updates group memberships based on the CSV but keeps members who were manually added via the MangoApps UI. Users who were not originally added through a CSV file will not be removed

***

### FTP Connector for Paycom HR System

MangoApps offers an FTP connector to automate user provisioning from the Paycom HR & payroll system.

#### Setup Process

1. **Contact Paycom Account Manager** with the following request:

   > "We have signed up for MangoApps and would like them to pick up a daily employee data file via SFTP. Please provide the following details: Site name, Host/IP/URL, Port, Name, Password."
2. **Forward these details** to your MangoApps Account Management Team for configuration assistance.

***

### FAQs

**Q: What happens if a group in the membership CSV does not exist?**\
A: The member assignment is skipped.

**Q: What happens if a user in the membership CSV is suspended?**\
A: The user is assigned groups but remains suspended.

**Q: Does MangoApps match group names case-sensitively?**\
A: No, group names are matched case-insensitively.

**Q: How are group IDs assigned?**\
A: Group IDs must be assigned via the groups CSV file and are not editable in the MangoApps UI.
