Skip to main content
tnesh
Staff & Editor
Staff & Editor
March 23, 2026

Technical Tip: How to create new administrator for FortiManager/FortiAnalyzer using JSON API

  • March 23, 2026
  • 0 replies
  • 79 views
Description

 

This article describes how to create a new administrator for FortiManager/FortiAnalyzer using API & Postman.

 

Scope

 

FortiManager, FortiAnalyzer.

 

Solution

 

Following is the base URL for FortiManager/FortiAnalyzer API request:

 

POST : https://{{host}}/jsonrpc 


Before taking any of the steps below, obtain the JSON API Session ID using the following API request.

Note: The session ID will be used in the rest of the JSON API request.

 

{     "id": 1,     "method": "exec",     "params": [{         "data": {             "user": "{{admin}}",             "passwd": "{{password}}"         },         "url": "/sys/login/user"     }] }

 

Scenario 1:  Create a single administrator:

Username: fpc1.

Password: Fortinet@123.

Profile: Super_User.

 

{     "method": "set",     "params": [         {             "data": [                 {                     "userid": "fpc1",                     "password": "Fortinet@123",                     "profileid": "Super_User"                 }             ],             "url": "/cli/global/system/admin/user"         }     ],     "session": "{{session}}",     "verbose": 1,     "id": 1 }

 

Scenario 2: Create multiple administrators based on specific requirements:

  • Username.
  • Password.
  • Profile.
  • Specific adom access.
  • JSON-API permission.

 

{     "method": "set",     "params": [         {             "data": [                 {                     "userid": "fpc2",                     "password": "Fortinet@123",                     "adom-access": "specify",                     "adom": [                         {                             "adom-name": "testtADOM"                         }                     ],                      "profileid": "Standard_User"                 },                 {                     "userid": "fpc1",                     "password": "Fortinet@123",                     "rpc-permit": "read-write",                     "profileid": "Super_User"                 }             ],             "url": "/cli/global/system/admin/user"         }     ],     "session": "{{session}}",     "verbose": 1,     "id": 1 }

 

Here is the administrator list in the GUI once the API is run successfully:

 

admin-user.png

 

Here's the JSON Request to get the administrator list via API:

 

{     "method": "get",     "params": [         {             "url": "/cli/global/system/admin/user"         }     ],     "session": "{{session}}",     "verbose": 1,     "id": 1 }

 

Related documents:

Technical Tip: Using FortiManager API

Fortinet Development Network (FNDN) - FortiManager