Skip to main content
Twinsen
New Member
April 19, 2020
Question

Using the API to retrieve (admin) accounts

  • April 19, 2020
  • 2 replies
  • 4266 views

Hi there,

Trying to retrieve admin user from 60E / 80E FG (6.2.3) using the API:

https://IP_ADDR/api/v2/cmdb/system/admin/?vdom=root&access_token=API_TOKEN

The request works but does not return anything. :(

Is this a bug or an expected behavior? Am I missing some extra parameters?

I've been using the API without any issue so far, but I can't figure this one out.

 

Thank you very much! :)

Tristan

    2 replies

    Jordan_Thompson_FTNT
    Staff
    Staff
    April 19, 2020

    Hi Tristan,

     

    What access profile do you have assigned to the API key you are using? The administrators table will only list administrators with the same or lower permission level as your key.

     

    Also, "vdom" is not necessary here as the administrator table is a global object.

     

    Jordan

    Twinsen
    TwinsenAuthor
    New Member
    April 19, 2020

    Hi Jordan,

    I created a REST API Admin as super_admin_readonly, which is not referenced in the Admin Profiles section of the FG (built-in account?). But he does have read access to everything so I guess it should work.

    Also, you are correct about the vdom, not using it gives the same result.

    Thanks !

     

    Tristan

    Twinsen
    TwinsenAuthor
    New Member
    April 22, 2020

    Hi again,

    I also tried to create a new admin user and to assigned him the API key, but it is still not working. :(

    Any clue?

    Thanks

    Remonw
    New Member
    March 28, 2022

    Hi Tristan,

     

    Did you ever found a solution to get all local users of a Fortigate?

     

    Thank you in advance.

     

    Best regards,

     

    Remon