Skip to main content
Atul_S
Staff & Editor
Staff & Editor
June 2, 2026

Troubleshooting Tip: FortiPortal Auto-Enrollment error

  • June 2, 2026
  • 0 replies
  • 19 views

Description

This article describes a solution to the FortiPortal auto-enrollment error. The user encounters an error when attempting to add a FortiManager with auto-enrollment, preventing the expected number of ADOMs from being imported.

Scope

FortiPortal, FortiManager.

Solution

When FortiPortal attempts to create the FortiManager object, it calls the internal API class, which expects a service‑provider ID.

If the Service Provider field is empty (or the service‑provider record does not exist), the constructor raises the following error, and the device is not added, although the organisation and site objects are created successfully.

ERROR – init() missing 1 required positional argument: 'service_provider'


To resolve the FortiPortal auto-enrollment error as below, follow these steps:

  • Ensure that the FortiManager version is compatible with the FortiPortal version. In this case, the issue was fixed in FortiPortal v7.4.11.

  • Verify that the metadata variables are assigned correctly in FortiManager.

  • In FortiPortal, after enrollment, the organisation and sites should be created.

  • Create a Service Provider record (if it doesn't already exist).


Navigate System → Service Providers → Create → Fill Name and ID (e.g., 1).

  • Add / Edit the FortiManager entry.

  1. Devices → FortiManager → Add (or edit existing).

  2. Fill Name, Host, Username, Password, and Port as usual.

  3. Enable 'Device Auto‑Enrollment'.

  4. Select the Service Provider created in step 2 (mandatory field).

  • Configure the metadata variables on the FortiManager (if not already done).

  1.  fpc_org – default organization name.

  2.  fpc_site – default site name.

  3.  fpc_org_email – optional e‑mail.


These variables must exist in every ADOM that contains devices to be auto‑enrolled.

Save the FortiManager entry and select Poll now (or wait for the configured polling interval).


Verify the enrollment: go to Organizations → <org> → Sites → <site> and confirm the expected devices appear.


If the issue persists, refer to the Fortinet Support Portal for further assistance.