Skip to Content

How to fix unable to add new service-account-id due to ‘unmatched double quote’ error

This article describes how to resolve the ‘unmatched double quote’ error seen after trying to add a new service-account-id on the FortiGate CLI.

Scope

FortiGate, FortiGateCloud.

Solution

The error occurs after applying the following to change or add a new FortiGateCloud user on FortiGate service-account-id:

execute fortiguard-log login <email> <password> <domain>

If quotes (‘ ‘) are used on the account password, the ‘unmatched double quote’ error message is likely to appear. For example:

execute fortiguard-log login [email protected] prueba123"h"1'2'F global
Failed: Error password(-403)
token line: Unmatched double quote.
Command fail. Return code 5

This is due to the fact the password used has quotes (prueba123″h”1’2’F), which causes the error message.

In this particular scenario, change the account password. Avoiding using quotes and then try again from the FortiGate CLI. For example:

execute fortiguard-log login [email protected] prueba123h12F$ global
Request sent. <- A correct registration request has been sent.