Claims Authentication – Could not retrieve a valid windows identity for username …

Claims Authentication – „Could not retrieve a valid windows identity for username <domain\user>“ wird in den ULS-Logs beim Versuch auf einen Webservice zuzugreifen (z.B. per Nintex Workflow) generiert.

Auf folgende Meldungen findet man in den ULS-Logs.

WTS0003: Der Aufrufer ist nicht für den Zugriff auf diesen Dienst berechtigt.

Im ULS-Log

WTS0003: The caller is not authorized to access the service

Im ULS-Log

Claims Authentication – No windows identity for <domain\user>

Im ULS-Log

SPSecurityContext: Could not retrieve a valid windows identity for username ‚<domain\user>‘ with UPN ‚<user>@<domain>‘. UPN is required when Kerberos constrained delegation is used

Deutsch:
SPSecurityContext: Could not retrieve a valid windows identity for username ‚<domain\user>‘ with UPN ‚<user>@<domain>‘. UPN is required when Kerberos constrained delegation is used. Exception: System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: WTS0003: Der Aufrufer ist nicht für den Zugriff auf diesen Dienst berechtigt. (Fehlerdetail ist gleich Ein ExceptionDetail, vermutlich erstellt durch IncludeExceptionDetailInFaults=TRUE, mit dem Wert: System.UnauthorizedAccessException: WTS0003: Der Aufrufer ist nicht für den Zugriff auf diesen Dienst berechtigt. bei Microsoft.IdentityModel.WindowsTokenService.CallerSecurity.CheckCaller(WindowsIdentity callerIdentity) . . .

Englisch:
SPSecurityContext.WindowsIdentity: Could not retrieve a valid windows identity for NTName='<domain\user>‘, UPN='<user>@<domain>‘. UPN is required when Kerberos constrained delegation is used. Exception: System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: WTS0003: The caller is not authorized to access the service. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: System.UnauthorizedAccessException: WTS0003: The caller is not authorized to access the service. at Microsoft.IdentityModel.WindowsTokenService.CallerSecurity.CheckCaller(WindowsIdentity callerIdentity . . .

Details

Beschreibung

Beim Versuch die Verbindung zu einem Webdienst (Webservice) herzustellen (z.B. mit Nintex Workflow) scheitert dieser mit der Fehlermeldung wie „Verbindung zum Server nicht möglich“.

Folgende Meldungen werden in das ULS Log geschrieben:

  • WTS0003: Der Aufrufer ist nicht für den Zugriff auf diesen Dienst berechtigt
  • Claims Authentication – No windows identity for <domain\user>
  • SPSecurityContext: Could not retrieve a valid windows identity for username ‚<domain\user>‘

Ist-Zustand

SharePoint Umgebung

ULS Log

In den ULS Logs findet man folgende Einträge:

Product: SharePoint Foundation

Deutsch

Process w3wp.exe
Product SharePoint Foundation
Category Claims Authentication
EventID
Level Medium
Message SPSecurityContext: Could not retrieve a valid windows identity for username ‚<domain\user>‘ with UPN ‚<user>@<domain>‘. UPN is required when Kerberos constrained delegation is used. Exception: System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: WTS0003: Der Aufrufer ist nicht für den Zugriff auf diesen Dienst berechtigt. (Fehlerdetail ist gleich Ein ExceptionDetail, vermutlich erstellt durch IncludeExceptionDetailInFaults=TRUE, mit dem Wert: System.UnauthorizedAccessException: WTS0003: Der Aufrufer ist nicht für den Zugriff auf diesen Dienst berechtigt. bei Microsoft.IdentityModel.WindowsTokenService.CallerSecurity.CheckCaller(WindowsIdentity callerIdentity) bei Microsoft.IdentityModel.WindowsTokenService.S4UServiceContract.PerformLogon(Func`1 logonOperation, Int32 pid) bei SyncInvokeUpnLogon(Object , Object[] , Object[] ) bei System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) bei System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) bei System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) bei System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc) bei System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet))….

Product: SharePoint Foundation

Englisch

Process w3wp.exe
Product SharePoint Foundation
Category Claims Authentication
EventID
Level Medium
Message SPSecurityContext.WindowsIdentity: Could not retrieve a valid windows identity for NTName='<domain\user>‘, UPN='<user>@<domain>‘. UPN is required when Kerberos constrained delegation is used. Exception: System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: WTS0003: The caller is not authorized to access the service. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: System.UnauthorizedAccessException: WTS0003: The caller is not authorized to access the service. at Microsoft.IdentityModel.WindowsTokenService.CallerSecurity.CheckCaller(WindowsIdentity callerIdentity) at Microsoft.IdentityModel.WindowsTokenService.S4UServiceContract.PerformLogon(Func`1 logonOperation, Int32 pid) at SyncInvokeUpnLogon(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)).

Product: SharePoint Foundation

Process w3wp.exe
Product SharePoint Foundation
Category Claims Authentication
EventID
Level Unexpected
Message No windows identity for <domain\user>.

 

Fix

Ab dem .NET 2.0 und dem Patch KB979917 ist die IIS-Option „aspnet:AllowAnonymousImpersonation“ standardmäßig auf „true“ eingestellt. Deshalb werden die Webservices mit dem IUSR-Account anstatt wie früher mit dem Account des Webanwendungspools kontaktiert.

Um dieses Verhalten zu ändern, kann man die Schritte aus einem der beiden unten stehenden Abschnitten durchführen.

aspnet:AllowAnonymousImpersonation im IIS Manager ändern

Auf jedem WFE folgende Einstellungen durchführen:

IIS-Manager starten.

Information Services (IIS) Manager - Internetinformationsdienste (IIS)-Manager - Icon 2

Sites > SharePoint – 80 > Anwendungseinstellungen

IIS - Manager - Sites - SharePoint - 80 - Optionen - Mittelfeld - Icons

Die Zeile aspnet:AllowAnonymousImpersonation auf false einstellen.

Dann auf der linken Seite den Server markieren und auf der rechten Seite des Fensters auf „Neu starten“ klicken.

Alternativ: web.config editieren

Als Alternative zur IIS-GUI könnte man die web.config Datei auf jedem WFE manuell anpassen.

Dazus die Datei öffnen:
C:\inetpub\wwwroot\wss\VirtualDirectories\80\web.config

Den Bereich <appSettings> finden und die Zeile mit dem Eintrag „aspnet:AllowAnonymousImpersonation“ auf „false“ setzen.

  <appSettings>
    <add key="aspnet:RestrictXmlControls" value="true" />
    <add key="FeedCacheTime" value="300" />
    <add key="FeedPageUrl" value="/_layouts/15/feed.aspx?" />
    <add key="FeedXsl1" value="/Style Library/Xsl Style Sheets/Rss.xsl" />
    <add key="ReportViewerMessages" value="Microsoft.SharePoint.Portal.Analytics.UI.ReportViewerMessages, Microsoft.SharePoint.Portal, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
    <add key="aspnet:AllowAnonymousImpersonation" value="false" />
  </appSettings>

Diese Einstellung muss auf allen WFEs vorgenommen werden.

Danach ein iisreset als Administrator (auf allen WFEs) ausführen.

Links

  1. surviving-sharepoint.blogspot.de: SharePoint 2013 access denied using web services to pull data from other SharePoint lists
  2. blogs.msdn.microsoft.com: Troubleshooting Claims to Windows NT Token Service (c2WTS) in SharePoint 2010 may be difficult if you don’t know where to start
  3. support.microsoft.com: Zwei Probleme können auftreten, wenn Sie eine ASP.NET 2.0-basierte Anwendung auf einem Server bereitstellen, auf dem IIS 7.0 oder IIS 7.5 im integrierten Modus ausgeführt wird
  4. onefootinthecloud.blogspot.de: Save Template Error – No Windows Identity for DOMAIN\User

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert