Reputation: 2523
CrmSvcUtil.exe /codeCustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization,Microsoft.Xrm.Client.CodeGeneration" /out:Xrm \Xrm.cs /url:https://mycrm.crm4.dynamics.com/XRMServices/2011/Organization.svc /username:name /password:pass /namespace:Xrm /serviceContextName:XrmServiceContext
If I run the above command, I get the following error:
Exiting program with exception: Value cannot be null. Parameter name: identityProvider
Its a dynamic crm online environment.
Upvotes: 2
Views: 3037
Reputation: 54140
I've had the same problem - in my case, there was a trailing space on the end of the username in my CrmSvcUtil.exe.config file.
This:
<add key="username" value="[email protected]" />
works fine, but this:
<add key="username" value="[email protected] " />
caused the error:
Exiting program with exception: Value cannot be null.
Parameter name: identityProvider
Upvotes: 1
Reputation: 3243
I was able to correct this by changing my username.
We use a single sign-on service. When I log into the CRM in the browser, I am taken to https://login.microsoftonline.com. There, I select my email address. Then the browser is directed to https://sso.mydomain.com. From here, I log in with my email address and regular network password. Then I am connected to the CRM in my browser.
When I change the /username
parameter to my email address that I use to log into the CRM, instead of my regular username, the problem disappears.
Upvotes: 0
Reputation: 18895
Just use this: https://xrmearlyboundgenerator.codeplex.com/ If it's missing a feature, let me know. It'll spit out the correct command line parameters.
Upvotes: 5
Reputation: 4585
Please try the following:
don't forget to update the username and password.
CrmSvcUtil.exe /url:https://mycrm.crm4.dynamics.com/XRMServices/2011/Organization.svc
/out:Xrm.cs /username:<username> /password:<password>
/namespace:Xrm /serviceContextName:XrmServiceContext
Upvotes: 0