# ServiceNow - 資産管理コネクターシンクレット

ServiceNow - インシデント管理コネクタThinkletを設定し、ワークフロー内で特定のアクションを実行させます。

## アクション: メールアドレスでユーザーの詳細を取得 <a href="#servicenow-assetmanagement-action-getuserdetailsbyemailaddress" id="servicenow-assetmanagement-action-getuserdetailsbyemailaddress"></a>

**メールアドレスでユーザーの詳細を取得**は詳細なユーザーデータを取得します。

ServiceNow - 資産管理コネクタThinkletは、[テーブル sys\_user GET](https://www.servicenow.com/docs/bundle/washingtondc-api-reference/page/integrate/inbound-rest/concept/c_TableAPI.html#title_table-GET) API endpointに依存しています。

<figure><img src="/files/MD6MizMcaPo5DTVqc7Gt" alt="image-20240604-123140.png" width="589"><figcaption></figcaption></figure>

* **パラメーター:** この操作で使用するデータをパラメーターとして設定します。 パラメーターがどのようにマッピングされ、どのデータが必要かに関する詳細情報は、ツールチップアイコンの上にマウスを置いてください。
  * **ユーザーのメールアドレス**
* **出力:** コネクタThinkletの出力を表示します。
  * **ユーザーID** (`UserID`)
  * **ユーザー名** (`UserName`): ServiceNow ユーザー名
  * **MFAを有効にする** (`EnableMultifactorAauthn`): 多要素認証を有効にする
  * **VIP** (`VIPUser`)
  * **パスワードリセットが必要** (`PasswordNeedsReset`)

以下の表は、コネクタを再作成する際に必要なAPIサービスコネクタの詳細を示しています。

<table><thead><tr><th width="272">フィールド</th><th>値</th><th data-hidden></th></tr></thead><tbody><tr><td>リソースパス</td><td><code>/api/now/table/sys_user?sysparm_query=email={{UserEmailAddress}}</code></td><td></td></tr><tr><td>メソッド</td><td>GET</td><td></td></tr><tr><td>ペイロード</td><td></td><td></td></tr><tr><td>出力</td><td><p><code>EnableMultifactorAuthn $.result[0].enable_multifactor_authn</code></p><p><code>PasswordNeedsReset $.result[0].password_needs_reset UserID $.result[0].sys_id</code></p><p><code>UserName $.result[0].user_name</code></p><p><code>VIPUser $.result[0].vip</code></p></td><td></td></tr></tbody></table>

## アクション: ユーザーIDでユーザーの詳細を取得 <a href="#servicenow-assetmanagement-action-getuserdetailsbyuserid" id="servicenow-assetmanagement-action-getuserdetailsbyuserid"></a>

**ユーザーIDでユーザーの詳細を取得**は詳細なユーザーデータを取得します。

ServiceNow - 資産管理コネクタThinkletは、[テーブル sys\_user GET](https://www.servicenow.com/docs/bundle/washingtondc-api-reference/page/integrate/inbound-rest/concept/c_TableAPI.html#title_table-GET) API endpointに依存しています。

以下はThinkletセットアップの例です。

<figure><img src="/files/fsW6JKaN8hQNogCAtTJi" alt="image-20240604-123942.png" width="580"><figcaption></figcaption></figure>

* **パラメーター:** このアクションで使用するパラメーターのデータを設定してください。 パラメーターがどのようにマッピングされ、どんなデータが必要かについての詳細は、ツールチップアイコンにカーソルを合わせてください。
  * **ServiceNowユーザーID**
* **出力:** コネクタThinkletの出力を表示します。
  * **ユーザーのメールアドレス** (`UserEmailAddress`)
  * **ユーザー名** (`UserName`): ServiceNow ユーザー名
  * **MFAを有効にする** (`EnableMultifactorAauthn`): 多要素認証を有効にする
  * **VIP** (`VIPUser`)
  * **パスワードリセットが必要** (`PasswordNeedsReset`)

以下の表は、コネクタを再作成する際に必要なAPIサービスコネクタの詳細を示しています。

<table><thead><tr><th width="272">フィールド</th><th>値</th><th data-hidden></th></tr></thead><tbody><tr><td>リソースパス</td><td><code>/api/now/table/sys_user/{{ServiceNowUserID}}</code></td><td></td></tr><tr><td>メソッド</td><td>GET</td><td></td></tr><tr><td>ペイロード</td><td></td><td></td></tr><tr><td>出力</td><td><p><code>UserEmailAddress $.result.email</code></p><p><code>EnableMultifactorAuthn $.result.enable_multifactor_authn PasswordNeedsReset $.result.password_needs_reset UserName $.result.user_name</code></p><p><code>VIPUser $.result.vip</code></p></td><td></td></tr></tbody></table>

## アクション: デバイス名でデバイスの詳細を取得 <a href="#servicenow-assetmanagement-action-getdevicedetailsbydevicename" id="servicenow-assetmanagement-action-getdevicedetailsbydevicename"></a>

**デバイス名でデバイスの詳細を取得**は、詳細なデバイスデータを取得します。

ServiceNow - 資産管理コネクタThinkletは、[テーブル cmdb\_ci\_computer GET](https://www.servicenow.com/docs/bundle/washingtondc-api-reference/page/integrate/inbound-rest/concept/c_TableAPI.html#title_table-GET) API endpointに依存しています。

<figure><img src="/files/uk7mmewi31dk0ztrab7t" alt="image-20240604-130939.png" width="583"><figcaption></figcaption></figure>

* **パラメーター:** この操作で使用するデータをパラメーターとして設定します。 パラメーターがどのようにマッピングされ、どのデータが必要かに関する詳細情報は、ツールチップアイコンの上にマウスを置いてください。
  * **デバイスID**
* **出力:** コネクタThinkletの出力を表示します。
  * **コンピュータID** (`ComputerID`): ServiceNow コンピュータID
  * **購入日** (`PurchaseDate`)
  * **保証期限日** (`WarrantyExpirationDate`)
  * **所有者ID** (`OwnedByID`)
  * **割り当てID** (`AssignedToID`)
  * **管理者ID** (`ManagedByID`)
  * **資産ID** (`AssetID`)
  * **ライフサイクルステージ** (`LifeCycleStage`): *不良*, *配備*, *寿命終了*, *在庫*, *紛失*, *運用中*, *購入*

以下の表は、コネクタを再作成する際に必要なAPIサービスコネクタの詳細を示しています。

<table><thead><tr><th width="272">フィールド</th><th>値</th><th data-hidden></th></tr></thead><tbody><tr><td>リソースパス</td><td><code>/api/now/table/cmdb_ci_computer?sysparm_query=name={{DeviceName}}</code></td><td></td></tr><tr><td>方法</td><td>取得</td><td></td></tr><tr><td>ペイロード</td><td></td><td></td></tr><tr><td>出力</td><td><p><code>AssetID $.result[0].asset.value</code></p><p><code>AssignedToID $.result[0].assigned_to.value</code></p><p><code>LifeCycleStage $.result[0].life_cycle_stage.value ManagedByID $.result[0].managed_by.value</code></p><p><code>OwnedByID $.result[0].owned_by.value</code></p><p><code>PurchaseDate $.result[0].purchase_date</code></p><p><code>ComputerID $.result[0].sys_id</code></p><p><code>WarrantyExpirationDate $.result[0].warranty_expiration</code></p></td><td></td></tr></tbody></table>

## アクション: デバイスIDでデバイスの詳細を取得 <a href="#servicenow-assetmanagement-action-getdevicedetailsbydeviceid" id="servicenow-assetmanagement-action-getdevicedetailsbydeviceid"></a>

**デバイスIDでデバイスの詳細を取得**は詳細なデバイスデータを取得します。

ServiceNow - 資産管理コネクタThinkletは、[テーブル cmdb\_ci\_computer GET](https://www.servicenow.com/docs/bundle/washingtondc-api-reference/page/integrate/inbound-rest/concept/c_TableAPI.html#title_table-GET) API endpointに依存しています。

<figure><img src="/files/vBfmNvJBmvN1BAyrzF5o" alt="image-20240604-131025.png" width="593"><figcaption></figcaption></figure>

* **パラメーター:** この操作で使用するデータをパラメーターとして設定します。 パラメーターがどのようにマッピングされ、どのデータが必要かに関する詳細情報は、ツールチップアイコンの上にマウスを置いてください。
  * **デバイスID**
* **出力:** コネクタThinkletの出力を表示します。
  * **コンピュータ名** (`ComputerName`): ServiceNow コンピュータ名
  * **購入日** (`PurchaseDate`)
  * **保証期限日** (`WarrantyExpirationDate`)
  * **所有者ID** (`OwnedByID`)
  * **割り当てID** (`AssignedToID`)
  * **管理者ID** (`ManagedByID`)
  * **資産ID** (`AssetID`)
  * **ライフサイクルステージ** (`LifeCycleStage`): *不良*, *配備*, *寿命終了*, *在庫*, *紛失*, *運用中*, *購入*

The table below shows the API Service connector details needed when recreating the connector:

<table><thead><tr><th width="272">フィールド</th><th>値</th><th data-hidden></th></tr></thead><tbody><tr><td>リソースパス</td><td><code>/api/now/table/cmdb_ci_computer/{{DeviceID}}</code></td><td></td></tr><tr><td>方法</td><td>取得</td><td></td></tr><tr><td>ペイロード</td><td></td><td></td></tr><tr><td>出力</td><td><p><code>AssetID $.result.asset.value</code></p><p><code>AssignedToID $.result.assigned_to.value</code></p><p><code>LifeCycleStage $.result.life_cycle_stage.value</code></p><p><code>ManagedByID $.result.managed_by.value</code></p><p><code>ComputerName $.result.name</code></p><p><code>OwnedByID $.result.owned_by.value</code></p><p><code>購入日 $.result.purchase_date 保証期間終了日 $.result.warranty_expiration</code></p></td><td></td></tr></tbody></table>

## アクション: CI IDでハードウェア資産の詳細を取得 <a href="#action-get-hardware-asset-details-by-ci-id" id="action-get-hardware-asset-details-by-ci-id"></a>

**CI IDでハードウェア資産の詳細を取得**は、詳細なハードウェア資産データを取得します。 このデータはワークフローに統合でき、例えばアセットの状態を確認し、「使用中」であるものに対してのみアクションを開始することができます。

ServiceNow - 資産管理コネクタThinkletは、[テーブル alm\_hardware GET](https://www.servicenow.com/docs/bundle/washingtondc-api-reference/page/integrate/inbound-rest/concept/c_TableAPI.html#title_table-GET) API endpointに依存しています。

以下はThinkletセットアップの例です。

<figure><img src="/files/GMskijYqzdbzRuA55gHs" alt="" width="563"><figcaption></figcaption></figure>

* **パラメーター**
  * **構成アイテムID (**`ConfigurationItemID`**)**
* **出力**
  * **状態** (`State`) - ハードウェア資産の状態— 1- *運用中*, 2- *注文中*, 3- *保守中*, 6- *在庫中*, 7- *退役*, 8- *紛失*, 9- *輸送中*, 11- *構築*
  * **サブステート** (`Substate`) - **状態**に依存する資産の現在のサブステート
  * **表示名** (`DisplayName`)
  * **ハードウェア資産ID** (`HardwareAssetID`)
  * **シリアル番号** (`SerialNumber`)

The table below shows the API Service connector details needed when recreating the connector:

<table><thead><tr><th width="272">フィールド</th><th>値</th><th data-hidden></th></tr></thead><tbody><tr><td>リソースパス</td><td><code>api/now/table/alm_hardware?sysparm_query=ci.value={{ConfigurationItemID}}&#x26;sysparm_limit=1</code></td><td></td></tr><tr><td>方法</td><td>取得</td><td></td></tr><tr><td>ペイロード</td><td></td><td></td></tr><tr><td>出力</td><td><p><code>AssetTag $.result[0].asset_tag</code></p><p><code>DisplayName $.result[0].display_name</code></p><p><code>State $.result[0].install_status</code></p><p><code>SerialNumber $.result[0].serial_number</code></p><p><code>Substate $.result[0].substatus</code></p><p><code>ハードウェア資産ID $.result[0].sys_id</code></p></td><td></td></tr></tbody></table>

## 操作: デバイスのライフサイクルステージとステータスを設定する <a href="#action-get-hardware-asset-details-by-ci-id" id="action-get-hardware-asset-details-by-ci-id"></a>

**デバイスのライフサイクルステージとステータスを設定する**操作は、CI（構成アイテム）コンピュータのライフサイクルステージとステータスを更新します。 ライフサイクルステージの標準的な値は、「不良品」、「展開」、「寿命終了」、「在庫」、「不足」、「運用中」、および「購入」です。 各ライフサイクルステージには、「メンテナンス中」や「使用中」などの対応する許可されたステータス値があります。 この操作は、これらのフィールドに対するローカルに定義された構成に従って使用する必要があります。

ServiceNow - 資産管理コネクタThinkletは、[Table cmdb\_ci\_computer PUT](https://www.servicenow.com/docs/bundle/washingtondc-api-reference/page/integrate/inbound-rest/concept/c_TableAPI.html#title_table-PUT) API endpointに依存しています。

以下はThinkletセットアップの例です：

<figure><img src="/files/0D13rizEHCclldhOb4Sl" alt="" width="563"><figcaption></figcaption></figure>

* **パラメーター**
  * **コンピュータID (ComputerID)**
  * **ライフサイクルステージ (LifeCycleStage)**
  * **ライフサイクルステージのステータス (LifeCycleStageStatus)**
* **出力**
  * **コンピュータID** (ComputerID) - ServiceNow コンピュータID

The table below shows the API Service connector details needed when recreating the connector:

<table><thead><tr><th width="272">フィールド</th><th>値</th><th data-hidden></th></tr></thead><tbody><tr><td>リソースパス</td><td><code>api/now/table/cmdb_ci_computer/{{ComputerID}}</code></td><td></td></tr><tr><td>方法</td><td>取得</td><td></td></tr><tr><td>ペイロード</td><td><code>{"life_cycle_stage": "{{LifeCycleStage}}", "life_cycle_stage_status": "{{LifeCycleStageStatus}}"}</code></td><td></td></tr><tr><td>出力</td><td><code>コンピュータID $.result[0].sys_id</code></td><td></td></tr></tbody></table>

{% hint style="info" %}
コネクタThinkletについての詳細は、[コネクタThinkletの設定](/platform/ja/user-guide/workflows/creating-workflows/configuring-connector-thinklet.md)ドキュメントを参照してください。
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nexthink.com/platform/ja/user-guide/workflows/creating-workflows/configuring-connector-thinklet/servicenow-asset-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
