Notes
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de vous connecter ou de modifier des répertoires.
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de modifier des répertoires.
Symptômes
Examinez le cas suivant :
- Vous utilisez des types de revendications SAML (Security Assertions Markup Language) qui utilisent les services fédérés Active Directory (AD FS) comme fournisseur d’authentification dans votre batterie de serveurs.
- Vous utilisez la revendication Role ou GroupSID pour accorder des autorisations aux utilisateurs sur des sites Microsoft SharePoint 2013 dans la batterie de serveurs.
- Votre version de batterie de serveurs est antérieure à la version 15.0.4805.1000 (mise à jour cumulative de mars 2016).
Dans ce scénario, les utilisateurs disposant des autorisations appropriées qui leur sont attribuées via le type de revendication Role ou GroupSID reçoivent des messages d’erreur « 401 non autorisés » lorsqu’ils utilisent la méthode d’authentification OAuth dans les cas suivants :
- Gestionnaire de flux de travail (flux de travail SharePoint 2013)
- Assistant Application web (WAC - Office Web Apps)
- Applications hébergées par un fournisseur à haut niveau de fiabilité ou à faible niveau de fiabilité
- Publication/consommation d’applications inter-batteries de serveurs
- Scénarios SharePoint 2013/SharePoint Online hybrides
- Intégration de SharePoint à Exchange et Lync 2013/Skype Entreprise
Résolution
Pour résoudre ce problème, installez la mise à jour cumulative de mars 2016 pour Microsoft SharePoint Server sur tous les serveurs de la batterie de serveurs.
Dans le cadre du correctif, une nouvelle propriété, GroupClaimType, est ajoutée à l’objet SPTrustedIdentityTokenIssuer. Pour que OAuth puisse fonctionner correctement, cette propriété doit être définie sur le type de revendication approprié pour les utilisateurs auxquels les autorisations sont attribuées via le type de revendication Role ou GroupSID.
Pour définir la propriété GroupClaimType, exécutez les commandes Windows PowerShell suivantes :
#Create a variable containing the SPTrustedIdentityTokenIssuer object
$issuer = Get-SPTrustedIdentityTokenIssuer
#Set the GroupClaimType property to the Role claim type, do not run for GroupSID claim type
$issuer.GroupClaimType = [Microsoft.IdentityModel.Claims.ClaimTypes]::Role
#Set the GroupClaimType property to the GroupSID claim type, do not run for Role claim type
$issuer.GroupClaimType = [Microsoft.IdentityModel.Claims.ClaimTypes]::GroupSid
#Update the SPTrustedIdenityTokenIssuer object to apply the change
$issuer.Update()
Informations supplémentaires
Exemple de message d’erreur à partir d’un flux de travail ayant échoué :
RequestorId: <Requestor ID>. Details: System.ApplicationException: HTTP 401 {"error":{"code":"-2147024891, System.UnauthorizedAccessException","message":{"lang":"en-US","value":"Access denied. You do not have permission to perform this action or access this resource."}} } {"Transfer-Encoding":["chunked"],"X-SharePointHealthScore":["0"],"SPRequestGuid":["<SP Request GUID>"],"request-id":["<Request ID>"],"X-FRAME-OPTIONS":["SAMEORIGIN"],"MicrosoftSharePointTeamServices":["15.0.0.4805"],"X-Content-Type-Options":["nosniff"],"X-MS-InvokeApp":["1; RequireReadOnly"],"Cache-Control":["max-age=0, private"],"Date":["Fri, 19 Aug 2016 20:35:30 GMT"],"Server":["Microsoft-IIS\/8.0"],"WWW-Authenticate":["NTLM"],"X-AspNet-Version":["4.0.30319"],"X-Powered-By":["ASP.NET"]} at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
Exemples d’entrées de journal dans le journal ULS (Unified Logging System) :
15:54:30.25 w3wp.exe (0x9FCC) 0x5F78 SharePoint Foundation CSOM aii1c Verbose Checking
SPBasePermissions.Open permission
15:54:30.25 w3wp.exe (0x9FCC) 0x5F78 SharePoint Foundation Authentication Authorization ajmmu
Medium Permission check failed. asking for 0x10000, have 0x2000000000 645f0edc-7ec9-44c5-84b7-
2adfba2f7f92
15:54:30.25 w3wp.exe (0x9FCC) 0x5F78 SharePoint Foundation CSOM afxwb High
System.UnauthorizedAccessException: Attempted to perform an unauthorized operation. at
Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException(UnauthorizedAccessException ex) at
Microsoft.SharePoint.SPSecurableObject.CheckPermissions(SPBasePermissions permissionMask) at
Microsoft.SharePoint.Client.SPClientServiceHost.OnBeginRequest() at
Microsoft.SharePoint.Client.Rest.RestService.ProcessQuery(Stream inputStream, IList`1
pendingDisposableContainer)
15:54:30.25 w3wp.exe (0x9FCC) 0x5F78 SharePoint Foundation CSOM agmjp High Original error:
System.UnauthorizedAccessException: Attempted to perform an unauthorized operation. at
Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException(UnauthorizedAccessException ex) at
Microsoft.SharePoint.SPSecurableObject.CheckPermissions(SPBasePermissions permissionMask) at
Microsoft.SharePoint.Client.SPClientServiceHost.OnBeginRequest() at
Microsoft.SharePoint.Client.Rest.RestService.ProcessQuery(Stream inputStream, IList`1
pendingDisposableContainer)
15:54:30.25 w3wp.exe (0x9FCC) 0x5F78 SharePoint Portal Server Microfeeds aizmo Medium
SocialRESTExceptionProcessingHandler.DoServerExceptionProcessing - SharePoint Server Exception
[System.UnauthorizedAccessException: Attempted to perform an unauthorized operation. at
Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException(UnauthorizedAccessException ex) at
Microsoft.SharePoint.SPSecurableObject.CheckPermissions(SPBasePermissions permissionMask) at
Microsoft.SharePoint.Client.SPClientServiceHost.OnBeginRequest() at
Microsoft.SharePoint.Client.Rest.RestService.ProcessQuery(Stream inputStream, IList`1
pendingDisposableContainer)] 645f0edc-7ec9-44c5-84b7-2adfba2f7f92
15:54:30.25 w3wp.exe (0x9FCC) 0x5F78 SharePoint Foundation Claims Authentication af32v Verbose
Claims Windows Sign-In: Sending 401 for request
'http://<;servername>;:30079/_vti_bin/client.svc/web/lists/getbyid(guid'<GUID>')' because the request is not from a browser.
15:54:30.25 w3wp.exe (0x9FCC) 0x5F78 SharePoint Foundation Authentication Authorization alkvd
Medium Throw UnauthorizedAccessException instead of SPUtilityInternal.Send401 for client.svc request.
État
Microsoft a confirmé qu’il s’agit d’un problème dans les versions de batterie de serveurs SharePoint antérieures à la mise à jour cumulative de mars 2016 (v. 15.0.4805.1000).
References
Encore besoin d’aide ? Accédez au site de la Communauté SharePoint.