信頼されたフォレスト内の任意のドメイン内のユーザーは、ピッカー エラー People完全一致が見つかりませんでした

元の KB 番号: 2874332

現象

2 つの Active Directory フォレスト間でフォレストの信頼を構成し、Windows インターネット ネーム サービス (WINS) が NetBIOS 解決に対して有効になっていないことを前提としています。 このような状況では、Microsoft SharePoint Server 2010 サイトのPeopleピッカーは、ローカル フォレスト内のユーザーに対して正常に動作します。 ただし、信頼されたフォレスト内の任意のドメイン内のユーザーの場合、Peopleピッカーは機能しません。

さらに、Peopleピッカーはユーザー アカウントを検索し、それを解決するように見えます。 ただし、ユーザーが [OK] を クリックしてサイトにポストバックすると、次のエラー メッセージが表示されます。

完全に一致するものはありませんでした。 解決されなかった項目をクリックすると、その他のオプションが表示されます。

を実行 NLtest /dsgetdcすると、同様のエラー メッセージが表示されます。 たとえば、 を実行 NLtest /dsgetdc:ExternalContosoすると、次のエラー メッセージが表示されます。

DC 名の取得に失敗しました: 状態 = 1355 0x54b ERROR_NO_SUCH_DOMAIN

統合ログ システム (ULS) ログには、次のようなエラーが表示されます。

w3wp.exe (0x0E98) 0x1DC4 SharePoint Foundation General 72e1 High ドメイン ExternalContoso のドメイン DNS またはフォレスト DNS を取得できません。 ErrorCode=1355

w3wp.exe (0x0E98) 0x1DC4 SharePoint Foundation General 72e9 Medium Error in resolving user 'ExternalContoso\UserName' : System.ArgumentException: 指定した値はパラメーターでサポートされていません {0} 。 Microsoft.SharePoint.Utilities.SPActiveDirectoryPrincipalBySIDResolver.ResolvePrincipal(String input, Boolean inputIsEmailOnly, SPPrincipalType scopes, SPPrincipalSource sources, SPUserCollection usersContainer) at Microsoft.SharePoint.Utilities.SPUtility.ResolvePrincipalInternal(SPWeb web, SPWebApplication webApp, Nullable'1 urlZone, String input,SPPrincipalType スコープ、SPPrincipalSource ソース、SPUserCollection usersContainer、Boolean inputIsEmailOnly、Boolean alwaysAddWindowsResolver)。

原因

この問題は、[OK] をクリックすると、Peopleピッカーが NetBIOS 呼び出しを行ってドメイン名の解決を試みるためです。 顧客に WINS が設定されていないため、NetBIOS ブロードキャストが発生します。 ただし、ブロードキャストはサブネットの外部で有効になっていないため、ブロードキャストは信頼されたドメインを見つけることができません。

解決方法

手順 1: 修正プログラムをダウンロードしてインストールする

SharePoint 修正プログラム パッケージをダウンロードしてインストールできます2687339: 2012 年 8 月

注:

2012 年 8 月 28 日以降にリリースされた新しい修正プログラム パッケージがインストールされている場合、または SharePoint Server 2010 Service Pack 2 がある場合は、修正プログラム 2687339をインストールする必要はありません。

手順 2: 修正プログラムを有効にする

NETBIOS または WINS が有効になっていないPeopleピッカーを使用するには、すべての Web アプリケーションで Windows PowerShell を明示的に使用して、ユーザーを解決するドメインを指定する必要があります。

修正プログラムをインストールした後、新しい機能を有効にするために設定する必要がある 2 つのプロパティがあります。

  • $farm.Properties["disable-netbios-dc-resolve"] がファーム レベルで設定されている
  • $wa.PeoplePickerSettings.SearchActiveDirectoryDomains は Web アプリケーション レベルで設定されます。

SearchActiveDirectoryDomainsで、ピッカーで検索する各ドメインの NetBIOS 名と DNS 名の間Peopleマッピングを作成します。

つまり、信頼された各ドメインとローカル ドメインをPeopleピッカー設定に一覧表示する必要があります。 フォレスト名を指定してから、Peopleピッカーでフォレストのすべてのドメインを解決することはできません。

Windows PowerShellを使用すると、次のサンプルに基づいてドメイン プロパティを設定できます。 YourWebApplicationURL> やドメイン名などの<プレースホルダーを独自の値に置き換えます。

# --------------------------------------------------------------------------------------
Add-PSSnapin Microsoft.SharePoint.PowerShell -ea silentlycontinue
# Enable the global setting for the farm. You must do this part only once.
$farm = get-spfarm
$farm.Properties
$farm.Properties["disable-netbios-dc-resolve"] = 'true'
$farm.Properties
$farm.Update()

# --------------------------------------------------------------------------------------
# Set the SearchActiveDirectoryDomains property for a single web application. You should only do this part once per-web application.
# Note: SearchActiveDirectoryDomains is the PowerShell equivelent of peoplepicker-searchadforests
$wa = Get-SPWebApplication [http://](http://m1garand/)
# Save current PP settings to text file in case you need to refer to those
$wa.PeoplePickerSettings.SearchActiveDirectoryDomains | out-file pp_settings_before.txt
# Clear the PP settings.
$wa.PeoplePickerSettings.SearchActiveDirectoryDomains.Clear()

# You must repeat the following example for all the domains for which you want People Picker to work on this particular web application.
# The following is an example of adding three domains from the same forest and one domain from a trusted forest:
# --------------------------------------------------------------------------------------
$newdomain = new-object Microsoft.SharePoint.Administration.SPPeoplePickerSearchActiveDirectoryDomain
$newdomain.DomainName ='oneDomain.corp.contoso.com'; # specify the DNS name
$newdomain.ShortDomainName ='oneDomain'; # Specify the netbios name.
$wa.PeoplePickerSettings.SearchActiveDirectoryDomains.Add($newdomain)

$newdomain2 = new-object Microsoft.SharePoint.Administration.SPPeoplePickerSearchActiveDirectoryDomain
$newdomain2.DomainName ='corp.contoso.com'; # specify the DNS name
$newdomain2.ShortDomainName ='CORP'; # Specify the netbios name.
$wa.PeoplePickerSettings.SearchActiveDirectoryDomains.Add($newdomain2)

$newdomain3 = new-object Microsoft.SharePoint.Administration.SPPeoplePickerSearchActiveDirectoryDomain
$newdomain3.DomainName ='contoso.com'; # specify the DNS name
$newdomain3.ShortDomainName ='CTSO'; # Specify the netbios name.
$wa.PeoplePickerSettings.SearchActiveDirectoryDomains.Add($newdomain3)

$newdomain4 = new-object Microsoft.SharePoint.Administration.SPPeoplePickerSearchActiveDirectoryDomain
$newdomain4.DomainName ='fabrikam.com'; # specify the DNS name
$newdomain4.ShortDomainName ='FAB'; # Specify the netbios name.
$wa.PeoplePickerSettings.SearchActiveDirectoryDomains.Add($newdomain4)
# --------------------------------------------------------------------------------------

# Once you have added all the required domains, save settings for the web app.
$wa.update()
# --------------------------------------------------------------------------------------

注:

修正プログラムを有効にするには、Web アプリケーションごとにこのサンプル スクリプトのバージョンを個別に実行する必要があります。

一方向信頼の例

この例は、ターゲット ドメインとの一方向の信頼があり、アプリケーション プール アカウントにアクセスできない場合にのみ使用します。

上記の例に似ています。アカウント名とパスワードを指定して、一方向の信頼されたドメインに接続します。

# --------------------------------------------------------------------------------------
# First, you have to run setapppassword on every server in the farm.
# This sets the encryption key that is used with the password that you enter for the account that you specify for $newdomain.loginname
stsadm -o setapppassword -password <password>.
# Where <password> is any string that you want to use as an encryption key.
# This has to be run on every server by using the same value for <password>.

# Now add the one-way trusted domain:
Add-PSSnapin Microsoft.SharePoint.PowerShell -ea silentlycontinue
$wa = Get-SPWebApplication http://<YourWebApplicationURL>
$newdomain = new-object Microsoft.SharePoint.Administration.SPPeoplePickerSearchActiveDirectoryDomain
$newdomain.DomainName =<'oneDomain.corp.contoso.com'>; # specify the DNS name
$newdomain.ShortDomainName =<'oneDomain'>; # Specify the netbios name.
$newdomain.loginname = <'oneDomain\userName'> # Specify an account that has access to the remote domain.
# Do not change anything in the next two lines. It prompts you to enter the password.
[System.Security.SecureString]$secureStringValue = Read-Host "Enter the account password: " -AsSecureString
$newdomain.setpassword($secureStringValue)
$wa.PeoplePickerSettings.SearchActiveDirectoryDomains.Add($newdomain) #Add the on-way trusted domain
$wa.update() #update the web app
# --------------------------------------------------------------------------------------

回避策

修正プログラムまたは Service Pack 2 をインストールできない場合は、Netlogon サービスで NetBIOS ドメイン名のドメイン解決情報をキャッシュすることで、この問題を回避できます。 これを行うには、次の手順を実行します。

  1. 外部ドメインごとに次のコマンドを含むバッチ ファイルを作成します。

    Nltest /dsgetdc:ExternalDomainName.FQDN
    Nltest /dsgetdc:ExternalDomainName
    

    たとえば、次のバッチ ファイルを作成します。

    Nltest /dsgetdc:external.contoso.com
    Nltest /dsgetdc:external
    Nltest /dsgetdc:domain2.contoso.com
    Nltest /dsgetdc:domain2
    
  2. このバッチ ファイルは、各 Web フロントエンド サーバーで 15 分ごとにスケジュールされたタスクとして実行します。 これにより、Netlogon キャッシュが設定され続け、エラーが発生しないようにする必要があります。