Hi everyone!
I am trying to configure server-based authentication with Microsoft Dynamics CRM on-premises IFD and SharePoint on-premises, do according to the instructions given here: technet.microsoft.com/.../dn949332.aspx after all the action at an attempt to enable server-based SharePoint integration to CRM and get an authorization error 401.
On the SharePoint side I use this one code of the article, however added the missing pieces:
$c = Get-SPSecurityTokenServiceConfig
$c.AllowMetadataOverHttp = $true
$c.AllowOAuthOverHttp= $true
$c.Update()
$i = New-SPTrustedSecurityTokenIssuer –Name "crm" –IsTrustBroker:$false -MetadataEndpoint "http://crm.domain.local/XrmServices/2015/metadataendpoint.svc/json?orgName=CRMOrgName"
$CrmRealmId = "1ab70db4-70f2-49fa-9713-9990863f365d"
$Identifier = "00000007-0000-0000-c000-000000000000@" + $CrmRealmId
$site = Get-SPSite "https://portal.domain.net/sites/crm/"
Register-SPAppPrincipal -site $site.RootWeb -NameIdentifier $Identifier -DisplayName "crm"
$app = Get-SPAppPrincipal -NameIdentifier $Identifier -Site "https://portal.domain.net/sites/crm/"
Set-SPAppPrincipalPermission -AppPrincipal $app -Site $site.Rootweb -Scope "sitecollection" -Right "FullControl" -EnableAppOnlyPolicy
#"Set up claims-based authentication mapping"
New-SPClaimTypeMapping -IncomingClaimType "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" -IncomingClaimTypeDisplayName "EmailAddress" -SameAsIncoming
Logs on SharePoin server contains the following errors:
02.26.2016 09:35:17.75 w3wp.exe (0x1BEC) 0x1880 SharePoint Portal Server User Profiles aiadx High Error converting nameId to SecurityIdentifier. This means caller is sending old format NameId (UPN value). This is not how O15 will ship.. The exception message is 'System.ArgumentException: Value was invalid. Parameter name: sddlForm
02.26.2016 09:35:17.75 w3wp.exe (0x1BEC) 0x1880 SharePoint Portal Server User Profiles ae0s1 High Identity claims mapped to '0' user profiles. Claims: [nameid: 'UserPupkin', nii: 'windows', upn: '', smtp: '', sip: ''], User Profiles:
02.26.2016 09:35:17.76 w3wp.exe (0x1BEC) 0x1880 SharePoint Portal Server User Profiles ae0sr Unexpected UserProfileException caught.. Exception Microsoft.Office.Server.Security.UserProfileNoUserFoundException: 3001002;reason=The incoming identity is not mapped to any user profile account in SharePoint. Possible cause is that no user profiles are created in user profile database. Contact your administrator.
02.26.2016 09:35:17.76 w3wp.exe (0x1BEC) 0x1880 SharePoint Portal Server User Profiles ae0su High The set of claims could not be mapped to a single user identity. Exception 3001002;reason=The incoming identity is not mapped to any user profile account in SharePoint. Possible cause is that no user profiles are created in user profile database. Contact your administrator. has occured.
02.26.2016 09:35:17.76 w3wp.exe (0x1BEC) 0x1880 SharePoint Foundation Claims Authentication ae0tc High The registered mappered failed to resolve to one identity claim. Exception: Microsoft.Office.Server.Security.UserProfileNoUserFoundException: 3001002;reason=The incoming identity is not mapped to any user profile account in SharePoint. Possible cause is that no user profiles are created in user profile database. Contact your administrator.
02.26.2016 09:35:17.76 w3wp.exe (0x1BEC) 0x1880 SharePoint Foundation Claims Authentication af3zp Unexpected STS Call Claims Saml: Problem getting output claims identity. Exception: 'Microsoft.Office.Server.Security.UserProfileNoUserFoundException: 3001002;reason=The incoming identity is not mapped to any user profile account in SharePoint. Possible cause is that no user profiles are created in user profile database. Contact your administrator.
02.26.2016 09:35:17.84 w3wp.exe (0x2338) 0x2F34 SharePoint Foundation Claims Authentication adlmz High [Forced due to logging gap, cached @ 02/26/2016 09:35:16.72, Original Level: Verbose] SPRequestSecurityToken: SerializeProperty() serializing elementname:{0}, with value:{1}.
02.26.2016 09:35:17.90 w3wp.exe (0x2338) 0x2F34 SharePoint Foundation Claims Authentication fsq7 High SPSecurityContext: Request for security token failed with exception: System.ServiceModel.FaultException: 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.
02.26.2016 09:35:17.92 w3wp.exe (0x2338) 0x2F34 SharePoint Foundation Claims Authentication 8306 Critical An exception occurred when trying to issue security token: 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..
02.26.2016 09:35:18.08 w3wp.exe (0x1BEC) 0x1894 SharePoint Foundation Claims Authentication amcbl Medium Trusted provider is missing. Provider: '00000003-0000-0ff1-ce00-000000000000'
02.26.2016 09:35:18.09 w3wp.exe (0x1BEC) 0x1894 SharePoint Foundation Claims Authentication af3y9 Medium STS Call Claims Saml: Successfully requested oauth claim identity.
Profile Service is running and synchronized it with AD. I do not know where smoter and where to look.
*This post is locked for comments
I have the same question (0)