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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Dynamics CRM 2013 and ADFS 2.0 on Windows Server 2008 R2 with SQL Server 2012

(0) ShareShare
ReportReport
Posted on by 250

Hi,

I am stuck during the creation of test environment on a a virtual  machine.

I have standalone server with Windows 2008 Server R2 and SQL Server 2012.

ADFS 2.0 is installed on default website, while Dynamics CRM 2013 is running on port 7777 on a separate website.

Everything seems perfectly configured, as ADFS is fetching the correct identifier on both Claim relying party and IFD  relying party trusts. But I am getting a weird message.

"An error has occurred. Try this action again. If the problem continues, check the Microsoft Dynamics CRM Community for solutions or contact your organization's Microsoft Dynamics CRM Administrator. Finally, you can contact Microsoft Support."

 

From event viewer, I am getting following warning:

==================================================================================

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 6/22/2014 4:23:58 PM
Event time (UTC): 6/22/2014 12:23:58 PM
Event ID: b5c373e975e2470fa33d529a23f980c0
Event sequence: 18
Event occurrence: 5
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/2/ROOT-1-130478950654949687
Trust level: Full
Application Virtual Path: /
Application Path: C:\Program Files\Microsoft Dynamics CRM\CRMWeb\
Machine name: CRM2013

Process information:
Process ID: 4880
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE

Exception information:
Exception type: CrmException
Exception message: The user Id is invalid.
at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetPrivilegedUserCallerAndBusinessGuidsFromThread(WindowsIdentity identity, IOrganizationContext context)
at Microsoft.Crm.Authentication.CrmWindowsIdentity.DoRecognizeUser(String userToken, Guid organizationId, LocatorServiceContext locatorServiceContext)
at Microsoft.Crm.Authentication.BaseCrmIdentity.RecognizeCrmUser(Guid organizationId, LocatorServiceContext locatorServiceContext)
at Microsoft.Crm.Authentication.BaseCrmIdentity.RecognizeCrmUser(Guid organizationId)
at Microsoft.Crm.Extensibility.InternalSdkContextInitializer.SetHttpContext(WindowsIdentity windowsIdentity, Guid organizationId, Guid callerId)
at Microsoft.Crm.Extensibility.InprocessServiceProxy.ExecuteCore(OrganizationRequest request)
at Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.XrmExecuteInternal()
at Microsoft.Crm.Application.Platform.ServiceCommands.RetrieveMultipleCommand.Execute()
at Microsoft.Crm.Application.Caching.CustomResourceLoader.GetCustomResources(IOrganizationContext context, Int32 cacheKey)
at Microsoft.Crm.Application.Caching.CustomResourceLoader.LoadCacheData(Int32 key, IOrganizationContext context)
at Microsoft.Crm.Caching.CrmMultiOrgCacheBase`2.LookupEntry(TKey key, IOrganizationContext context)
at Microsoft.Crm.Application.ResourceManager.CustomResourceManager.TryGetCultureString(String name, CultureInfo culture, Boolean getSystemString, IOrganizationContext context)
at Microsoft.Crm.Application.ResourceManager.CustomResourceManager.TryGetCultureString(String name, CultureInfo culture, IOrganizationContext context)
at Microsoft.Crm.Application.ResourceManager.BasicResourceManager.GetCultureString(String name, CultureInfo culture, IOrganizationContext context)
at Microsoft.Crm.Controls.Header..ctor(Boolean isControlHeader)
at Microsoft.Crm.Controls.BasicHeader..ctor()
at Microsoft.Crm.Application.Controls.AppHeader..ctor()
at ASP.default_aspx.__BuildControlcrmHeader() in c:\Program Files\Microsoft Dynamics CRM\CRMWeb\default.aspx:line 9
at ASP.default_aspx.__BuildControlTree(default_aspx __ctrl) in c:\Program Files\Microsoft Dynamics CRM\CRMWeb\default.aspx:line 1
at ASP.default_aspx.FrameworkInitialize() in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\82ce50f4\e77f4ed8\App_Web_pjhnwbmy.1.cs:line 0
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.default_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\82ce50f4\e77f4ed8\App_Web_pjhnwbmy.1.cs:line 0
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)



Request information:
Request URL: https://lms.contoso.com:7777/default.aspx
Request path: /default.aspx
User host address: 192.168.15.123
User: Contoso\ADMINISTRATOR
Is authenticated: True
Authentication Type: Federation
Thread account name: NT AUTHORITY\NETWORK SERVICE

Thread information:
Thread ID: 7
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: True
Stack trace: at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetPrivilegedUserCallerAndBusinessGuidsFromThread(WindowsIdentity identity, IOrganizationContext context)
at Microsoft.Crm.Authentication.CrmWindowsIdentity.DoRecognizeUser(String userToken, Guid organizationId, LocatorServiceContext locatorServiceContext)
at Microsoft.Crm.Authentication.BaseCrmIdentity.RecognizeCrmUser(Guid organizationId, LocatorServiceContext locatorServiceContext)
at Microsoft.Crm.Authentication.BaseCrmIdentity.RecognizeCrmUser(Guid organizationId)
at Microsoft.Crm.Extensibility.InternalSdkContextInitializer.SetHttpContext(WindowsIdentity windowsIdentity, Guid organizationId, Guid callerId)
at Microsoft.Crm.Extensibility.InprocessServiceProxy.ExecuteCore(OrganizationRequest request)
at Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.XrmExecuteInternal()
at Microsoft.Crm.Application.Platform.ServiceCommands.RetrieveMultipleCommand.Execute()
at Microsoft.Crm.Application.Caching.CustomResourceLoader.GetCustomResources(IOrganizationContext context, Int32 cacheKey)
at Microsoft.Crm.Application.Caching.CustomResourceLoader.LoadCacheData(Int32 key, IOrganizationContext context)
at Microsoft.Crm.Caching.CrmMultiOrgCacheBase`2.LookupEntry(TKey key, IOrganizationContext context)
at Microsoft.Crm.Application.ResourceManager.CustomResourceManager.TryGetCultureString(String name, CultureInfo culture, Boolean getSystemString, IOrganizationContext context)
at Microsoft.Crm.Application.ResourceManager.CustomResourceManager.TryGetCultureString(String name, CultureInfo culture, IOrganizationContext context)
at Microsoft.Crm.Application.ResourceManager.BasicResourceManager.GetCultureString(String name, CultureInfo culture, IOrganizationContext context)
at Microsoft.Crm.Controls.Header..ctor(Boolean isControlHeader)
at Microsoft.Crm.Controls.BasicHeader..ctor()
at Microsoft.Crm.Application.Controls.AppHeader..ctor()
at ASP.default_aspx.__BuildControlcrmHeader() in c:\Program Files\Microsoft Dynamics CRM\CRMWeb\default.aspx:line 9
at ASP.default_aspx.__BuildControlTree(default_aspx __ctrl) in c:\Program Files\Microsoft Dynamics CRM\CRMWeb\default.aspx:line 1
at ASP.default_aspx.FrameworkInitialize() in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\82ce50f4\e77f4ed8\App_Web_pjhnwbmy.1.cs:line 0
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.default_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\82ce50f4\e77f4ed8\App_Web_pjhnwbmy.1.cs:line 0
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


Custom event details:

======================================================================================

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Remon Profile Picture
    1,485 on at

    Hi,

    Do you have all Claims setup correctly in ADFS? UPN, Name, Primary SID?

    Sounds like you authenticate ok against ADFS, but CRM cannot find you based on UPN/SID.

    Check your claims,

    Good luck,

  • JoJi Profile Picture
    250 on at

    Thanks Remon for your reply.

    .

    Yes you are right. ADFS is authenticating but CRM is having some issue.

    All claim rules are configured properly.

    JOJI

  • Remon Profile Picture
    1,485 on at

    Hi JOJI,

    have you used the same account (contoso\administrator) for your service accounts? Or did you use Network Service?

    If Network service; is it (=computername) in all the correct AD Groups?

    And of course; is the account you're trying really available in CRM with appropriate role?

  • JoJi Profile Picture
    250 on at

    Yes, it is the same account "Administrator" for  service and of course, the user "Administrator" already exists in the the CRM.

    In fact, before enabling Claim base authentication, I was using the same account.

  • Verified answer
    Remon Profile Picture
    1,485 on at

    Hi,

    read this:

    Microsoft Dynamics CRM services and application pool (CRMAppPool) identity accounts must not be configured as a Microsoft Dynamics CRM user. Doing so can cause authentication issues and unexpected behavior in the application for all Microsoft Dynamics CRM users.

    More information:Problems in CRM when the CRMAppPool user account is a CRM user (go.microsoft.com/.../p)

    taken from: msdn.microsoft.com/.../hh699825.aspx

    This might be the reason of your errors.

    Check this first, for a quick change of service accounts, user a repair of the setup.

    Good luck,

  • JoJi Profile Picture
    250 on at

    Thanks Remon, its worked out!

  • Arpita Saini Profile Picture
    on at

    As this is resolved. Closing this thread!

    Thanks!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans