Ryan Spears
Ryan Spears

Reputation: 3011

Microsoft CRM dynamics 2011: crmsvcutil Access is denied exception

I have been attempting to use the command line tool crmsvcutil (as Administrator) to generate a data context class and DTOs for our CRM Entities.

I am getting the following exception: Exiting program with exception: Access is denied.

My command-line arguements are as follows:

crmsvcutil /url:"http://<ourdynamicscrm>/XRMServices/2011/Organization.svc" /u:"<user Name>" /p:"<password>" /d:"<domain>"  /namespace:OurNameSpace.Xrm /serviceContextName:OurServiceContextName.Crm /o:Crm.cs

The user is an Administrator on the CRM box.

Has anyone had this problem and know what I am missing?

Upvotes: 2

Views: 3177

Answers (2)

Ryan Spears
Ryan Spears

Reputation: 3011

I found what I was doing wrong and it was quite simple. I had left out the Organization Name section in the URL.

The code below generated the desired entities.

crmsvcutil /url:"http://<ourdynamicscrm>/<organization name>/XRMServices/2011/Organization.svc" /u:"<user Name>" /p:"<password>" /d:"<domain>"  /namespace:OurNameSpace.Xrm /serviceContextName:OurServiceContextName.Crm /o:Crm.cs

Upvotes: 7

Bryan Weaver
Bryan Weaver

Reputation: 4473

Are you using claims based authentication with IFD? If so we ran into the same problem im our environment. There is a bug in the crmsvcutil.

Here is some information on the work around I used that worked.

Claims-based Authentication Workaround for SDK Version 5.0.3

Upvotes: 3

Related Questions