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:
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:
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: