Hi,
I have a problem with the RESTAPI to create a localuser on my Fortiauthenticator.
When i use the expires_at field, i get automatically an error :
Cannot add local user "toto" (Response: HTTP 400), Error: b'{"localusers": {"expires_at": ["Invalid time format. Time should be formatted using ISO-8601 (e.g. 2015-02-17T15:42:50.972335-08:00). If timezone is not given, time is assumed to be in UTC."]}}'
I'd tried with many format (with and without timezone, miliseconds), i also tried with the example... Nothing at all.
Solved! Go to Solution.
I've updated my authenticator from version 6.6.2 to version 6.6.3 and everything is working well now.
I did a test in FAC 6.5.6, created from UI a local user and read its expiration with API. With the same attribute tried to create another user and is created successfully:
What value are you setting for this attribute?
Created on 05-06-2025 09:12 AM Edited on 05-06-2025 09:19 AM
Hi Ebilcari,
I try with 2025-05-06T22:00:00.000000+02:00
I'm using a script (python)
I also try with the example (only change the year) :
2015-02-17T15:42:50.972335-08:00
2026-02-17T15:42:50.972335-08:00
I would suggest to do some test by using curl like mentioned in this section of the guide to isolate this time format issue, it is is related to FAC or the python script.
It's the same :s
I've updated my authenticator from version 6.6.2 to version 6.6.3 and everything is working well now.
User | Count |
---|---|
2599 | |
1382 | |
803 | |
663 | |
455 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.