LanSweeper Custom Widget

LanSweeper Custom Widget

Overview  

The Lansweeper custom widget integrates Lansweeper  asset discovery directly into the  request details page of ServiceDesk Plus. This enables technicians to search, view, and associate assets from Lansweeper  with a specific request, while maintaining data synchronization between both systems.

The authentication is performed by using a personal access token  (PAT). Widget API requests sent  to Lansweeper use the PAT in the authorization header.


Features  

1. Search Assets  

Technicians can search Lansweeper  assets by using these keywords:

  • IP addresses

  • MAC addresses

  • Asset names

  • Asset types

Search results appear directly inside the widget and can be associated with the request.

2. Suggested Assets  

The widget automatically extracts IP addresses and MAC addresses from ServiceDesk Plus requests' metadata (from details, notes, or descriptions), queries Lansweeper, and suggests likely asset matches.

This reduces manual lookup effort and improves asset–ticket mapping accuracy.

3. Asset Association  

After an asset is selected from search or suggestions, the widget associates that asset with the request in ServiceDesk Plus by using internal widget APIs.

4. View Asset Details  

Clicking an associated asset opens the full details fetched from Lansweeper:

  • Vulnerability information

  • Warranty details

  • Serial number/Model Number/Manufacturer information (based on LanSweeper’s stored data)

Users can copy these details to the clipboard for documentation.


Authentication (PAT-Based)  

This implementation uses a personal access token.

Every request to Lansweeper uses:

Authorization: Token <YOUR_PAT_TOKEN>

The widget stores the PAT securely in the server and never exposes it to the front end.


 

 

 

Generate Personal Access Token

Create an API client in Lansweeper  as described in the below screenshot. Click Continue.

Choose the token expiry date and site to associate. Click Allow.

An identity code is generated. This is the token used for requesting API information. Copy the token and store it in a secure location.

 

Configuration  

Configuration JSON File  

The widget includes a dedicated JSON configuration file placed inside the widget directory. This file allows admins to define:

  • Lansweeper Site

  • Lansweeper Domain

 

 

 

Example configuration:

{

  "siteId": "<site_id>",

  "domain": "eu.lansweeper.com",

}

 

 Configuration in SDP 

 Create Service and Connection 

Follow the steps below to create a service and connection in ServiceDesk Plus.

Navigate to Admin > Connections.

Create a service with name "lansweeper". Parameter Key, Parameter Type, and Authentication Type as shown below

 

Create Connection using the above created service with connection name "lansweeper".

Click Create and Connect. When prompted for authorization, provide the PAT token in mentioned format. Click Connect to authorize.

 

Go to Admin > custom widgets. Click new and upload the provided zip file. Click save.

Configure the widget to add/remove location in "request" module.

 

Go to request module to find the widget in the configured location.