Skip to main content
Nariael
New Member
May 6, 2025
Solved

Fortiauthenticator API : create localuser expires_at

  • May 6, 2025
  • 2 replies
  • 1016 views

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.

Best answer by Nariael

I've updated my authenticator from version 6.6.2 to version 6.6.3 and everything is working well now.

2 replies

ebilcari
Staff
Staff
May 6, 2025

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:

 

user creation.PNG

What value are you setting for this attribute?

Emirjon
Nariael
NariaelAuthor
New Member
May 6, 2025

Hi Ebilcari,

 

I try with 2025-05-06T22:00:00.000000+02:00

I'm using a script (python) 

Capture d'écran 2025-05-06 181001.png

Nariael
NariaelAuthorAnswer
New Member
May 7, 2025

I've updated my authenticator from version 6.6.2 to version 6.6.3 and everything is working well now.