Created on
12-16-2015
10:51 PM
Edited on
05-12-2025
09:41 PM
By
Anthony_E
Description
Scope
Solution
curl -k -v -u "szadmin:ytYq8QwNPhpNlPJqAPIeGVBB0xQsFkaau80WW4Xy" https://10.129.0.60/api/v1/localusers/?username=<ldapusername>
The following output will be displayed:
< HTTP/1.1 200 OK
< Date: Sun, 13 Dec 2015 09:28:58 GMT
< Server: Apache
< Vary: Accept,Accept-Language,Cookie
< X-Frame-Options: SAMEORIGIN
< Content-Language: en
< Cache-Control: no-cache
< Transfer-Encoding: chunked
< Content-Type: application/json
<
{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null, "total_count": 1}, "objects": [{"active": true, "dn": "CN=stan,CN=Users,DC=sz,DC=com,DC=local", "email": "", "first_name": "stan", "ftm_act_method": "email", "id": 3, "last_name": "", "mobile_number": "", "resource_uri": "/api/v1/ldapusers/3/", "server_address": "10.129.0.50", "server_name": "SZ_AD","token_auth": false, "token_serial": "", "token_type": "", "username": "stan"}
curl -k -v -u "szadmin:ytYq8QwNPhpNlPJqAPIeGVBB0xQsFkaau80WW4Xy" -X PATCH -d {\"token_auth\":\"true\",\"token_type\":\"ftm\",\"email\":\"test@abc.com\"} -H "Content-Type: application/json" https://10.129.0.60/api/v1/ldapusers/3/
Note:
Replace the ID '3”' without the bracket, with the correct ID from the user listing. For example: https://10.129.0.60/api/v1/ldapusers/<3>/
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.