Unable To Generate Early Bound Class Dynamics CRM Online


Recently i needed to generate early bound class for my dynamics crm 365 online and i faced a weird issue.

I had my SDK which i have been using so i opened the command prompt and tried below commands :

1. CrmSvcUtil.exe /url:https://passiond.api.crm8.dynamics.com/XRMServices/2011/Organization.svc /out:C:\Users\rawish.kumar\Desktop\EarlyBound.cs /username:"rawish.kumar@passiond.onmicrosoft.com" /password:"password" /namespace:earlybound /serviceContextName:ServiceContext


2. CrmSvcUtil.exe /url:https://passiond.api.crm8.dynamics.com/XRMServices/2011/Organization.svc /out:GeneratedCode.cs /username:"rawish.kumar@passiond.onmicrosoft.com" /password:"password"


However it wasn’t working and i was getting below error :

Unable to login to Dynamic CRM 


  1. first i tried to modify the command by NOT providing username and password & simply putting /il in the end :
    CrmSvcUtil.exe /url:https://passiond.api.crm8.dynamics.com/XRMServices/2011/Organization.svc /out:GeneratedCode.cs  /il

    what it does is – it gives you a popup from XRMTooling to enter username password manually.

  2. I downloaded the latest version of CrmSvcUtil from Nuget by using powershell.
    to do this – open powershell as an admin and enter the below command first + Enter:

    $sourceNugetExe = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" $targetNugetExe = ".\nuget.exe" Remove-Item .\Tools -Force -Recurse -ErrorAction Ignore Invoke-WebRequest $sourceNugetExe -OutFile $targetNugetExe Set-Alias nuget $targetNugetExe -Scope Global -VerboseAnd then below + Enter:./nuget install Microsoft.CrmSdk.CoreTools -O .\Tools md .\Tools\CoreTools $coreToolsFolder = Get-ChildItem ./Tools | Where-Object {$_.Name -match 'Microsoft.CrmSdk.CoreTools.'} move .\Tools\$coreToolsFolder\content\bin\coretools\*.* .\Tools\CoreTools Remove-Item .\Tools\$coreToolsFolder -Force-Recurse

  3. It will download the latest version of this tool for you which you can find under  C:\Users\rawish.kumar\.nuget\packages\Microsoft.CrmSdk.CoreTools\\content\bin\coretools
  4. Now what you have to do is replace the with above i command prompt:
    just type in cd followed by the path C:\Users\rawish.kumar\.nuget\packages\Microsoft.CrmSdk.CoreTools\\content\bin\coretools
  5. Now put the main command which we prepared and hit enter:
    CrmSvcUtil.exe /url:https://passiond.api.crm8.dynamics.com/XRMServices/2011/Organization.svc /out:GeneratedCode.cs/il

  6. it will give you a popup to login:
  7. Once its done – it will take some time and download the code:
  8. the file will be generated in the same folder.


I hope this helps!


3 comments on “Unable To Generate Early Bound Class Dynamics CRM Online”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.