简体   繁体   中英

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

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.

Access is denied suggests you have the wrong user name and password provided.

There are examples of how the command line should look here , perhaps your username is in the wrong format?

The first example is for the Microsoft account identity provider and the second is for the Office 365 identity provider.

CrmSvcUtil.exe /url:https://myorg.api.crm.dynamics.com/XRMServices/2011/Organization.svc    /out:GeneratedCode.cs /username:"myname@live.com" /password:"myp@ssword!" 

CrmSvcUtil.exe /url:https://myorg.api.crm.dynamics.com/XRMServices/2011/Organization.svc    /out:GeneratedCode.cs /username:"myname@myorg.onmicrosoft.com" /password:"myp@ssword!"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM