get_device_client_location
Locate where a client is connected on a managed device by IP, MAC, or hostname, returning the FortiAP or FortiSwitch, port, and VLAN for troubleshooting.
Instructions
Locate a client on a device (Asset Identity Center): which FortiAP / FortiSwitch + VLAN it is connected through.
Proxies the device's detected-device inventory
(/api/v2/monitor/user/device/query) -- the data behind the FortiManager
"Asset Identity Center" view -- and answers "where is this client connected".
Each match resolves to the access point / switch + port and VLAN the client
is on, plus hostname, vendor/OS, online state, DHCP lease and vuln count.
Filter to one client by ip, mac or hostname (each provided filter
narrows; a hostname match is case-insensitive substring). With no filter, the
full detected-client inventory is returned (summarized).
Args: adom: ADOM name (defaults to DEFAULT_ADOM / "root" when omitted) device: Managed device name (e.g. "FGT-HQ"). Defaults to DEFAULT_DEVICE when omitted; required if that is not configured. ip: Client IPv4 address to locate (exact match) mac: Client MAC address to locate (case-insensitive) hostname: Client hostname to locate (case-insensitive substring)
Returns: dict with keys: - adom, device - query: the filter used (or None for full inventory) - match_count - clients: summarized detected-client records (ap/switch/port/vlan/...) - error / error_code: on failure
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ip | No | ||
| mac | No | ||
| adom | No | ||
| device | No | ||
| hostname | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||