Hi
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 (I mean no ADFS / IFD ,etc.)
Note: Both servers are on the same active directory domain.
Thanks
Edit1:
I just executed with this command:
New-SPClaimTypeMapping -IncomingClaimType https://schemas.xmlsoap.org/ws/2005/05/identity/claims/domainname/ -IncomingClaimTypeDisplayName /AD Username/ -LocalClaimType https://schemas.xmlsoap.org/ws/2005/05/identity/claims/thumbprint/OrNew-SPClaimTypeMapping -IncomingClaimType https://schemas.xmlsoap.org/ws/2005/05/identity/claims/domainname/ -IncomingClaimTypeDisplayName /AD Username/ -SameAsIncoming
But I get this error in Event Viewer:
Application information: Application domain: /LM/W3SVC/1/ROOT-2-133479075976081369 Trust level: Full Application Virtual Path: / Application Path: C://Program Files//Dynamics 365//CRMWeb// Machine name: CRM-1 Process information: Process ID: 13316 Process name: w3wp.exe Account name: domain//user Exception information: Exception type: CrmException Exception message: Failed to connect to SharePointSite. at Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.XrmExecuteInternal() at Microsoft.Crm.Application.Platform.ServiceCommands.RetrieveMultipleCommand.Execute() at Microsoft.Crm.ApplicationQuery.RetrieveMultipleCommand.RetrieveData() at Microsoft.Crm.ApplicationQuery.ExecuteQuery() at Microsoft.Crm.Application.Platform.Grid.GridDataProviderQueryBuilder.GetData(QueryBuilder queryBuilder) at Microsoft.Crm.Application.Controls.SharePointGridDataProvider.GetData(QueryBuilder queryBuilder) at Microsoft.Crm.Application.Platform.Grid.GridDataProviderQueryBuilder.LoadQueryData() at Microsoft.Crm.Application.Platform.Grid.GridDataProviderQueryBuilder.LoadData() at Microsoft.Crm.Application.Platform.Grid.GridDataProviderBase.PrepareGridData() at Microsoft.Crm.Application.Platform.Grid.GridDataProviderBase.PrepareData() at Microsoft.Crm.Application.Controls.GridUIProvider.Render(HtmlTextWriter output) at Microsoft.Crm.Application.Components.UI.Grid.DataGrid.RenderInnerHtml(HtmlTextWriter output) at Microsoft.Crm.Application.Components.UI.Grid.DataGrid.Render(HtmlTextWriter output) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at Microsoft.Crm.Application.Components.UI.CrmUIControlBase.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at Microsoft.Crm.Application.Components.UI.CrmUIControlBase.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at Microsoft.Crm.Application.Components.UI.CrmUIControlBase.RenderControl(HtmlTextWriter writer) at Microsoft.Crm.Application.Components.PageHandlers.AreaPageHandler.RenderAreaPageContent(HtmlTextWriter writer) at Microsoft.Crm.Application.Components.PageHandlers.AreaPageHandler.HandlerRender(HtmlTextWriter output) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) Request information: Request URL: https://server/orgname/userdefined/areas.aspx?oId={ORGGUID}&oType=10191&rof=true&inlineEdit=1&theme=Outlook15White&navItemName=Documents&security=852023&tabSet=areaSPDocuments&pagemode=iframe&formid=f2e430fa-f438-4ca4-80a0-2c8f5d79a296 Request path: /orgname/userdefined/areas.aspx User host address: 192.168..... User: domain/est1 (The Calling User ID) Is authenticated: True Authentication Type: Negotiate Thread account name: domain//user Thread information: Thread ID: 12 Thread account name: domain//user Is impersonating: False Stack trace: at Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.XrmExecuteInternal() at Microsoft.Crm.Application.Platform.ServiceCommands.RetrieveMultipleCommand.Execute() at Microsoft.Crm.ApplicationQuery.RetrieveMultipleCommand.RetrieveData() at Microsoft.Crm.ApplicationQuery.ExecuteQuery() at Microsoft.Crm.Application.Platform.Grid.GridDataProviderQueryBuilder.GetData(QueryBuilder queryBuilder) at Microsoft.Crm.Application.Controls.SharePointGridDataProvider.GetData(QueryBuilder queryBuilder) at Microsoft.Crm.Application.Platform.Grid.GridDataProviderQueryBuilder.LoadQueryData() at Microsoft.Crm.Application.Platform.Grid.GridDataProviderQueryBuilder.LoadData() at Microsoft.Crm.Application.Platform.Grid.GridDataProviderBase.PrepareGridData() at Microsoft.Crm.Application.Platform.Grid.GridDataProviderBase.PrepareData() at Microsoft.Crm.Application.Controls.GridUIProvider.Render(HtmlTextWriter output) at Microsoft.Crm.Application.Components.UI.Grid.DataGrid.RenderInnerHtml(HtmlTextWriter output) at Microsoft.Crm.Application.Components.UI.Grid.DataGrid.Render(HtmlTextWriter output) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at Microsoft.Crm.Application.Components.UI.CrmUIControlBase.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at Microsoft.Crm.Application.Components.UI.CrmUIControlBase.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at Microsoft.Crm.Application.Components.UI.CrmUIControlBase.RenderControl(HtmlTextWriter writer) at Microsoft.Crm.Application.Components.PageHandlers.AreaPageHandler.RenderAreaPageContent(HtmlTextWriter writer) at Microsoft.Crm.Application.Components.PageHandlers.AreaPageHandler.HandlerRender(HtmlTextWriter output) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) Custom event details: