Search code examples
dynamics-crmmicrosoft-dynamicsdynamics-crm-onlinedynamics-crm-2016

crmsvcutil.exe: Unable to generate entity classes for early binding - Dynamics CRM Online


I am trying to generate early bound entity classes from my Dynamics CRM Online instance.

I have CRM SDK installed on my machine.

I am running following command from the "Bin" folder of SDK.

crmsvcutil.exe /url:<<OrganizationServiceUrl>> /out:crmexams3.cs /username:"<<username>>" /password:"<<password>>"

But this gives me following error:

Error requesting orgs from the discovery server
Access is denied

I have replaced the OrganizationServiceUrl with the organization service url which I could found from Developer resources in CRM instance.

My instance is CRM 2016 Online.

Any idea why this is failing?

Thanks


Solution

  • If you put /il as an argument and remove the username and password you can enter the credentials, domain, etc through a XRMTooling Login Control. Entering it in manually has the benefits of:

    • It will potentially fix your problem.
    • It makes it so you aren't storing credentials somewhere, which is a little bit of a security faux paux.