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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

slow when login crm (CrmException: The current organization id could not be determined.)

(0) ShareShare
ReportReport
Posted on by 8

We are encountering an issue with our Microsoft Dynamics 365 On-Premises environment where users cannot access the organization URL.

Environment Details:

  • Product: Microsoft Dynamics 365 On-Premises

  • Version: 9.1.42

  • Server: D365.test.local

  • Organization Name: test-01

  • URL: https://192.168.7.181/test-01

  • IIS Version: IIS 10

Issue Description:
When attempting to access the organization URL, the application fails to load and generates an ASP.NET exception in the Windows Event Viewer.

Event Log Details:
Log Name: Application
Source: ASP.NET 4.0.30319.0
Event ID: 1309
Event Code: 3005

Exception:
 

Log Name:      Application
Source:        ASP.NET 4.0.30319.0
Date:          3/5/2026 10:55:03 PM
Event ID:      1309
Task Category: Web Event
Level:         Warning
Keywords:      Classic
User:          N/A
Computer:      D365.test.local
Description:
Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 3/5/2026 10:55:03 PM 
Event time (UTC): 3/5/2026 8:55:03 PM 
Event ID: 3bbfd3b4bde5467381b9f23b2dccef4f 
Event sequence: 271 
Event occurrence: 2 
Event detail code: 0 
 
Application information: 
    Application domain: /LM/W3SVC/1/ROOT-1-134172169416366596 
    Trust level: Full 
    Application Virtual Path: / 
    Application Path: C:\Program Files\Dynamics 365\CRMWeb\ 
    Machine name: D365 
 
Process information: 
    Process ID: 9448 
    Process name: w3wp.exe 
    Account name: test\administrator 
 
Exception information: 
    Exception type: CrmException 
    Exception message: The current organization id could not be determined.
   at Microsoft.Crm.Application.Security.UserInformationIdentity.get_OrganizationId()
   at Microsoft.Crm.CrmCache`1.InternalAddEntry(String cacheKey, Object value, String[] dependencyKeys, IOrganizationContext context)
   at Microsoft.Crm.CrmCache`1.AddEntryNoLock(String key, TValue value, String[] dependencyKeys, IOrganizationContext context)
   at Microsoft.Crm.Caching.BasicCrmCache`2.AddEntityFromLookupInternal(String key, TValue value, IOrganizationContext context)
   at Microsoft.Crm.Caching.BasicCrmCache`2.AddEntryFromLookupCallback(String key, TValue value, IOrganizationContext context, Object parameter)
   at Microsoft.Crm.CrmCache`1.AddEntry(String key, TValue value, IOrganizationContext context, AddEntryCallback`1 callback, Object callbackParameter)
   at Microsoft.Crm.Caching.BasicCrmCache`2.AddEntryFromLookup(String key, TValue value, IOrganizationContext context)
   at Microsoft.Crm.Caching.BasicCrmCache`2.LookupEntry(TKey key, IOrganizationContext context)
   at Microsoft.Crm.Application.Themes.Theme.get_Current()
   at ASP.test_01__common_styles_theme_css_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Page.Render(HtmlTextWriter writer)
   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://192.168.7.181:443/test-01/_common/styles/theme.css.aspx?lcid=1033&ver=-533910750 
    Request path: /test-01/_common/styles/theme.css.aspx 
    User host address: 192.168.7.181 
    User:  
    Is authenticated: False 
    Authentication Type:  
    Thread account name: test\administrator 
 

the users login but after 40 sec of slow 

 

Note : attached screen shots of the current state

1.PNG
2.PNG

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

Categories:
I have the same question (0)
  • Suggested answer
    11manish Profile Picture
    365 on at
    The error you’re seeing in Microsoft Dynamics 365:
     
    CrmException: The current organization id could not be determined
     
    combined with very slow login (~40 seconds) usually indicates a configuration or authentication resolution problem, not a simple IIS error.
    This issue typically occurs when CRM cannot resolve the organization context during the request pipeline.
    Most Common Causes in Dynamics 365 On-Prem 9.1

    Incorrect CRM Deployment URL Binding (Very Common)
     
    Your organization URL is:
     
    https://192.168.7.181/test-01
     
    But Dynamics expects access using the server hostname, not the IP.
     
    Example:
    https://D365.test.local/test-01
     
    CRM resolves the organization using host headers + deployment configuration.
    Using an IP address often breaks organization resolution.
     
    Fix
    Avoid IP-based URLs.
     
    CRM Website Authentication Configuration
    Verify IIS authentication settings.
     
    CRMAppPool Identity Problem
     
    Your log shows:
    Process account: test\administrator
    This is not recommended.
     
    CRMAppPool should run under:
    Network Service
    or a dedicated CRM service account.
     
    Missing Organization Mapping in Deployment Manager
    Open Microsoft Dynamics 365 Deployment Manager
    Check:
    Organizations
     â†’ test-01
    Verify:
    • Organization is Enabled
    • State = Ready
    If not:
    • Right Click → Enable

    DNS Resolution Delay (Causes 40s Login Delay)
    The 40 second delay strongly suggests DNS resolution issues.
    Test from the CRM server:
    • ping D365.test.local
    • nslookup D365.test.local
    Also test reverse lookup:
    • nslookup 192.168.7.181
    If reverse DNS fails → authentication delays occur.
    Fix by adding DNS A and PTR records.
     
    SPN (Kerberos) Issues
    If using Windows Authentication:
    Check SPN:
    • setspn -L D365
    • If CRMAppPool uses domain account:
    • setspn -S HTTP/D365.test.local test\crmservice
     
    CRM Cache Issue
    Sometimes CRM cache causes this error.
    Clear CRM cache:
    C:\Program Files\Dynamics 365\CRMWeb\Server\bin\assembly
    Restart:
    • IISRESET
       
  • CU06031402-0 Profile Picture
    8 on at
    Still same issue exists as i try login with fqdn and still issue repeated 
  • CU06031402-0 Profile Picture
    8 on at
    No change 
  • CU06031402-0 Profile Picture
    8 on at
    any updates?
  • CU14031118-1 Profile Picture
    4 on at
     
    i have done all steps but still get the same issue
  • 11manish Profile Picture
    365 on at
    As per understanding, Your 40 second delay before login usually indicates:
    • DNS reverse lookup delay
    • SQL connectivity delay
    • Authentication negotiation
    As per above statement, you have verified above my instructions. then I will suggest you to open Microsoft support ticket.
     
    They will help to investigate of real root cause.
     
     
  • CU14031118-1 Profile Picture
    4 on at
    how can u open ticket as my server is test before applying on prod and my license is trial 
  • CU06031402-0 Profile Picture
    8 on at
    are there any updates can made for this issue as my client is impacted after upgrade to v9.1
  • Suggested answer
    Assisted by AI
    ManoVerse Profile Picture
    935 Super User 2026 Season 1 on at
    I am not the OnPremise expert here as did end to end implementation long before and not having any handy environment with me to give you with screenshot advise,  This answer build with help of AI and with my existing knowledge , also I have asked in community if anyone can help for this issue ,
     
    but try with below solution and let us know if this helps: 
    It occurs when Dynamics cannot resolve the Organization Context early in the request pipeline, usually during unauthenticated requests (CSS, theme, images) before login completes. The slow 30–40s delay is critical here.
    This issue can be cause by  authentication, SPN, IIS binding, or organization URL resolution failures, NOT corrupted CSS file
    ✅ Cause #1 – URL / Binding / Host Header Mismatch (MOST COMMON)
    You are accessing CRM via:
    https://192.168.7.181/test-01
    But Dynamics 365 9.1 explicitly requires host‑header‑based access, not IP addresses, for proper organization resolution.

    ✅ Fix

    Create a DNS A‑record:
    crm.test.local → 192.168.7.181
    Update IIS Binding:
    Site: Microsoft Dynamics CRM
    HTTPS
    Host name: crm.test.local

    Access CRM only via:https://crm.test.local/test-01
     
    ✅ Cause #2 – SPN / Kerberos Authentication Fallback (40‑Second Delay Confirms This)
    Your log shows:
    Is authenticated: False
    Authentication Type:
    Thread account: test\administrator
    That 40‑second delay is classic NTLM fallback while Kerberos fails.
    Microsoft confirms:
    If Kerberos SPNs are missing or incorrect, CRM delays authentication before defaulting to NTLM, causing slow login and failed org resolution
    ✅ Fix (Required Even if Using NTLM)
    Run as Domain Admin:
    setspn -L test\administrator

    Ensure SPNs exist for the CRM site account:
    setspn -A HTTP/crm.test.local test\administrator
    setspn -A HTTP/D365.test.local test\administrator
    Then recycle app pool:
    iisreset
    ✅ Expected result: login drops from 40s → <5 seconds, error disappears.
     
    ✅ Cause #3 – Claims / Windows Authentication Order Incorrect
    Dynamics requires Windows Authentication providers in the correct order.
    ✅ Correct IIS Settings
    CRM Web Site → Authentication
    Setting Value
    Anonymous Disabled
    Windows Enabled
    Providers (Order) Negotiate FIRST, NTLM second
     
    SQL & Service Account Permissions (Quick Check)
    Verify CRMAppPool account:
    Has db_owner on:
    <ORGNAME>_MSCRM
    MSCRM_CONFIG
    Missing permissions can also cause cache failures.
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
11manish Profile Picture

11manish 174

#2
ManoVerse Profile Picture

ManoVerse 58 Super User 2026 Season 1

#3
Niki Patel Profile Picture

Niki Patel 42

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans