I have integrated MS Dynamics 365 & SharePoint Server but the default "SPClaimTypeMapping" is by email:
New-SPClaimTypeMapping -IncomingClaimType "https://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" -IncomingClaimTypeDisplayName "EmailAddress" -SameAsIncoming
But I need to map the users by Active Directory user (name or id).
I was trying to do this by running this command:
New-SPClaimTypeMapping -IncomingClaimType "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" -IncomingClaimTypeDisplayName "UserName" -SameAsIncoming
No success and I get exceptions like this:
Exception message: No Microsoft Dynamics 365 user exists with the specified domain name and user ID
at Microsoft.Crm.Authentication.Claims.AuthenticationProvider.GetOrganizationId(ClaimsPrincipal principal)
I have read many many documents but nothing is clearly stated a mapping for AD (not ADFS or IFD ,etc.)
Note: Both servers are on the same domain.
Thanks