---
sourceDocument: Yokohama プラットフォームセキュリティ
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ja-JP/yokohama/platform-security

 Release :

    - yokohama

ft:locale :

    - ja-JP

ft:publication_title :

    - Yokohama プラットフォームセキュリティ

ft:clusterId :

    - psec

bundleId :

    - psec

workflow :

    - Platform


---

# userAccountControl フィールドを使用した非アクティブな LDAP アカウントの検索

# userAccountControl フィールドを使用した非アクティブな LDAP アカウントの検索 {#ariaid-title1}

* リリースバージョン: Yokohama
* 
* 更新日 2025年01月30日
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 所要時間：1分

Active Directory (AD) ユーザーがいつ削除されるか (または非アクティブになるか) を識別します。

## 始める前に

必要なロール：アドミン

## このタスクについて

1 つの方法は、AD ユーザーのアクティブステータスを追跡し、AD アカウントが非アクティブなときに対応するアカウントを更新するビジネスルールを作成することです。

## 手順

1. ユーザー \[sys_user\] テーブルに新しい文字列フィールドを作成して、AD \[userAccountControl\] フィールドの値を追跡します。  
   例：`u_ad_user_account`
2. フィールド値を設定する LDAP 変換スクリプトを作成します。  

       target.u_ad_user_account = source.userAccountControl

3. LDAP フィルターを更新して、無効な AD アカウントを表示します。  
   フィルターの例を次に示します。  

       (&(objectClass=person)(sn=*)(!(objectClass=computer))(!(userAccountControl:1.2.840.113556.1.4.803:=2)))

   使用できる交換用フィルターの例を次に示します。  

       (&(objectClass=person)(sn=*)(!(objectClass=computer)))

4. \[u_ad_user_account\] フィールドの値が 514 の場合は常に active フィールドを false に設定する onChange ビジネスルールを作成します。  
   「514」は非アクティブなアカウントを示します。

