segunda-feira, 16 de fevereiro de 2015

SharePoint 2013 - Workflow cancelado: HTTP 401 "There has been an error authenticating the request"


O fluxo de trabalho no SharePoint 2013 fica normalmente no estado cancelado com a mensagem de erro "There has been an error authenticating the request" se o usuário que iniciou o fluxo não possui um perfil no serviço de aplicação "User Profile Service Application".

Isso é "by design" devido a utilização do protocolo OAuth, utilizado na comunicação entre o Workflow Manager e o SharePoint, porque os tokens OAuth contém apenas o UPN (User Principal Name) por razões de segurança. 

O SharePoint utiliza essa informação (o UPN) para obter mais detalhes sobre o usuário no serviço "User Profile Service Application".

Resumindo: Os fluxos de trabalho do SharePoint 2013 requerem o serviço "User Profile Service Application" e das informações nele.



Mensagem de erro no interface:


RequestorId: <GUID>. Details: System.ApplicationException: HTTP 401 {“x-ms-diagnostics”:[“3001000;reason=\”There has been an error authenticating the request.\”;category=\”invalid_client\””],”SPRequestGuid”:[“<GUID>″],”request-id”:[“<GUID>″],”X-FRAME-OPTIONS”:[“SAMEORIGIN”],”SPRequestDuration”:[“61″],”SPIisLatency”:[“1″],”Server”:[“Microsoft-IIS\/8.0″],”WWW-Authenticate” [...]

Mensagens de error nos logs do SharePoint:



SPApplicationAuthenticationModule: Error authenticating request, Error details { Header: {0}, Body: {1} }. Available parameters: 3001000;reason="There has been an error authenticating the request.";category="invalid_client" {"error_description":"The server was unable to process the request due to an internal error.  For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs."} .               \
The server was unable to process the request due to an internal error.  For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.   at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.ReadResponse(Message response)     at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst, RequestSecurityTokenResponse& rstr)   
SharePoint 2013 e OAuth - Uma visão geral

 []

Nenhum comentário:

Postar um comentário