User Tools

Site Tools


This is an old revision of the document!

Importing User .csv file via XML API

*This fix is for firmware after v18.0 MR3 and v17.5 MR14

SFOS has an XML API that provides a way to automatically manage most objects and features that can be controlled via the Webadmin user interface, and User objects are no exception. The current work around to the old CSV import feature for bulk adding of on-device user accounts is to use this service. For more detailed explanation visit this site

Enabling XML API on your firewall

1) Log in to your XG Firewall as an Administrator account

2) Go to Backup & firmwareAPI

3) Under API configuration, check the Enabled box

4) Under Allowed IP address, enter the IP address of the computer where you are going to run this program

Installing Python 3 and preparing dependencies

Install Python 3 on your computer

  • Python 3 comes built in to some Unix-based systems, including MacOS
  • For Windows systems, you can download and install the latest Python installer from
  • For Linux distributions, your system's default package manager will almost certainly have a suitable package ready to install

For MacOS

Although Python 3 is now included in MacOS (since version 10.15), python 2 is still the default. To solve this run the program as python3 instead of python. When run this way you may get an error about missing the 'requests' module, in which case you can install the python3 version:

python3 -m pip install requests

For Windows

1) When installing Python on Windows, make sure to select the option to “Add Python to PATH” on the first screen of the installer. This will allow you to run python scripts from a Windows command prompt

2) After installation completes, open a new Command Prompt window

3) Install additional libraries that are required to run this program - run

C:\Users\John> pip install requests python-certifi-win32

4) If you have enabled TLS decryption on your XG Firewall and get a certificate error running this command, you can either create a decryption exclusion for the domain or get a copy of your firewall's root CA certificate in a file and rerun the command as follows:

C:\Users\John> pip install requests python-certifi-win32 --cert mycacert.pem
public/importing_user_csv_file_via_xml_api.1618589267.txt.gz · Last modified: 2021/04/16 16:07 by rhudak