---
title: "Import Lansweeper assets into the CMDB"
site: admin
version: 1.11
versions: "all"
url: https://docs-new.servicely.ai/admin/1.11/integrations/lansweeper/
type: task
application: cmdb
last_updated: 2026-10-18
commit: 5ea5eb0dd83d
---


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.

## 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>
    Activate the Lansweeper integration application [UNVERIFIED].
  </Step>
  <Step>
    In Lansweeper, create an integration app by following the Lansweeper quickstart. Set its callback URL to `https://<instance-name>.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 **Administration → Integration → System OAuth providers** and create a provider with the values in the table below.

    | 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-name>.servicely.ai/sso/oauth_callback` |
  </Step>
  <Step>
    Go to **Administration → Integration → 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 a 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>
    Set up a system table cleanup record for the import table.
  </Step>
  <Step>
    Go to **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:environments/transform-maps)
- [System Table Cleanup](page:platform/system-table-cleanup)
- [Outbound credentials](page:integrations/outbound-credentials)
