---
title: "Import Lansweeper assets into the CMDB"
site: admin
version: 2027.1
versions: "all"
url: https://docs-new.servicely.ai/admin/2027.1/integrations/lansweeper/
type: task
application: cmdb
last_updated: 2026-12-03
commit: 8d233372fa05
---


Import devices discovered by Lansweeper Cloud into the CMDB, one CI class at a time. This page is for administrators who set up the integration, ideally on a non-production instance first.

<Callout type="info">
  **Changed in 2027.1.** Providers and tokens are under **Integrations → API access**. Jobs, server scripts and system table cleanup are in their own modules of the Administration workspace. The 2027.1 release does not ship a Lansweeper application, so contact Servicely Support before you start.
</Callout>

## Before you begin

- You need the `administrator` role.
- You need a Lansweeper Cloud account that can create an integration app. The integration works with the Cloud edition of Lansweeper. For an on-premises Lansweeper, contact Servicely Support.
- If you have already built your own Lansweeper integration, contact Servicely Support before you activate this one.
- Choose the Lansweeper asset types to test with and the CMDB table they belong in. Lansweeper groups many devices by operating system, so a Servicely class such as servers often needs a filter across several asset types.
- Import each attribute from one system only. Lansweeper also collects data from other sources, so do not import the same attribute from both.

## Steps

<Steps>
  <Step>
    Check that the Lansweeper integration is on your instance: the `LansweeperIntegration` property set and the `LansweeperIntUtil` script library exist. If they do not, contact Servicely Support.
  </Step>
  <Step>
    In Lansweeper, create an integration app by following the Lansweeper quickstart. Set its callback URL to `https://<instance>.servicely.ai/sso/oauth_callback`. Keep the client ID, client secret and authorization URL in Lansweeper until you enter them in the next step.
  </Step>
  <Step>
    In Servicely, go to **Integrations → API access → System OAuth providers**. Create a provider with the values below.

    <Image src="asset:screenshots/admin/integrations-lansweeper/nav-api-access.png">The System OAuth providers item in the API access menu of Integrations.</Image>

    | Field | Value |
    | --- | --- |
    | Authentication method | Request body |
    | Authorization URL | `https://app.lansweeper.com/authorize-app/<client_id>` |
    | Token URL | `https://api.lansweeper.com/api/integrations/oauth/token` |
    | Redirect URL | `https://<instance>.servicely.ai/sso/oauth_callback` |
  </Step>
  <Step>
    Go to **Integrations → API access → System API outbound tokens** and create an OAuth2 token for that provider. Set **OAuth Prompt** to **consent** and **Scopes** to `offline_access`.
  </Step>
  <Step>
    On the token, select **Get authorization token** and sign in with a Lansweeper account.
  </Step>
  <Step>
    Create an import table for the class. Any name works. A pattern such as `<prefix>Lansweeper<Class>Import` keeps them easy to find. You do not need to generate the temporary table before the first import.
  </Step>
  <Step>
    Open the `LansweeperIntegration` property set and fill in the global properties and the properties for your class. Keep the class's transform property, for example `LansweeperIntSwitchEnableTransform`, set to `false` and set the page limits low, for example 5, so the first run is quick to check. The [Lansweeper integration properties](page:integrations/lansweeper-properties) reference lists each one.
  </Step>
  <Step>
    Run the import once from **System & deployment → Diagnostics → Server script**. The first argument is the class name used in your property names. The second is the page to start at. Keep it at 1.

    ```javascript
    LansweeperIntUtil.lansweeperIntegrationEntryPoint("Switch", 1);
    ```
  </Step>
  <Step>
    Check the rows in your import table. If the fields or the filter are wrong, change the class properties and run the import again. Errors appear in the system log.
  </Step>
  <Step>
    When the data is right, delete the rows from the import table and create a transform map from it to the CMDB table. Use the Lansweeper `key` as the primary key. Set the class's transform map property, for example `LansweeperIntSwitchTransformMap`, set its transform property to `true` and raise the page limits so a run loads every record.
  </Step>
  <Step>
    At **System & deployment → Housekeeping → System table cleanup**, set up a cleanup record for the import table.
  </Step>
  <Step>
    Go to **Scripting & automation → Jobs & generators → Jobs** and activate the job for your class. The integration ships a sample job for switches, **(Lansweeper) Load Switches**, which runs daily.
  </Step>
</Steps>

## Result

The job imports the class from Lansweeper's GraphQL `assetResources` query on its schedule and transforms the rows into the CMDB. If a run reaches the page limit, it stops reading pages and does not transform. Repeat the steps from the import table onwards for each further class.

<Callout type="warning">
  When you first turn on the transform, it also transforms every row still in the import table in a pending state. Delete test rows before you enable it.
</Callout>

## Related

- [Lansweeper integration properties](page:integrations/lansweeper-properties)
- [Transform maps](page:data-import/transform-maps)
- [System table cleanup records](page:platform/jobs-and-logs/system-table-cleanup-records)
- [Outbound credentials](page:integrations/outbound-credentials)
