web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Dynamics 365 and SharePoint On-premise server side integration with AD username or UserID

(1) ShareShare
ReportReport
Posted on by 14
 

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: 
 
I have the same question (0)
  • Dengliang Li Profile Picture
    Microsoft Employee on at
    Hi,
     
    According to this official document.
    You can customize the claim mapping and the custom claim mapping will override the default email claim mapping.
  • Bandeh Profile Picture
    14 on at
    Thanks
    Is Active Directory username a custom claim mapping?
     
    How do I do that?
    Best

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Subra Profile Picture

Subra 127

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 97 Super User 2026 Season 1

#3
11manish Profile Picture

11manish 87

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans