locked
CrmSvcUtil Error: "Username is not provided" RRS feed

  • Question

  • I'm trying to use the CrmSvcUtil.exe utility with a CRM 2013 Online deployment using the following command:

    CrmSvcUtil.exe /url:https://<org>.api.crm.dynamics.com/XRMServices/2011/Organization.svc /out:"Xrm.cs" /username:"<username>@<org>.onmicrosoft.com" /password:"<password>" /serviceContextName:"XrmServiceContext"

    and I get the following error:

    "The username is not provided. Specify username in ClientCredentials"

    Googling for this issue has been super unhelpful so I'm wondering if anybody else has come across this and managed to solve it.

    Thanks

    Thursday, May 1, 2014 4:00 PM

All replies

  • If you are having a tough time, you can try out this tool which will auto-generate the command and create the strongly types class file for you.

    https://xrmearlyboundgenerator.codeplex.com/


    Jason Lattimer
    My Blog -  Follow me on Twitter -  LinkedIn

    Thursday, May 1, 2014 6:42 PM
    Moderator
  • Same problem here - No solution  HTTP://xrmearlyboundgenerator.codeplex.com/  works fine so i presume some coding issue in the login module and change from liveid to office 365 wich is not handled the correct way. Same error Specify username in ClientCredentials even. Parameter is correct     ->   /username:"xxx" /password:"xxxx".
    Wednesday, May 7, 2014 11:55 AM
  • I've got the same problem too when using the CrmSvcUtil.exe in the 2013 SDK. Interestingly, I don't have a problem using the crmsvcutil from the 2011 SDK against the same org (CRM 2013 Online, on the Office 365 billing portal).

    I'm not sure if the problem is I'm using an online federation account (i.e. username@mydomain.com) which is not the same as the one I'm logged into my computer with. I tried using the CrmServiceHelper.cs class in the 2013 SDK sample code, and that seems to work fine in a sample app, so there's nothing fundamentally wrong with my org name, username, or password. I'm wondering if CrmSvcUtil is trying to use different code or logic to try and connect and there's a problem there.

    Thursday, May 8, 2014 2:25 AM
  • I'm having the same problem with the latest SDK.  Microsoft, are you listening?
    Sunday, May 11, 2014 9:23 PM
  • If someone is looking for old sdk (and want to try a different crmsvcutil.exe) here there is a onedrive folder with all crm 2013 sdk released:

    OneDrive Folder


    My blog: www.crmanswers.net - Rockstar 365 Profile

    Sunday, May 11, 2014 9:34 PM
  • Haven't tried all of Guido's versions yet, but so far 6.0.0 and 6.0.4 work. 6.0.4 v2 doesn't work, and I've got 6.1 installed previously and that doesn't work either.

    Update: so versions 6.0.0 to 6.0.4 v1 work fine. 6.0.4 v2 and 6.1.0 do not work. In terms of crmsvcutil versions, 6.0.0001.0061 works, 6.0.0002.0042 and 6.1.0000.0575 do not work.

    • Edited by RichardIw Sunday, May 11, 2014 10:08 PM
    Sunday, May 11, 2014 9:58 PM
  • Same problem here - No solution  HTTP://xrmearlyboundgenerator.codeplex.com/  works fine so i presume some coding issue in the login module and change from liveid to office 365 wich is not handled the correct way. Same error Specify username in ClientCredentials even. Parameter is correct     ->   /username:"xxx" /password:"xxxx".
    The HTTP://xrmearlyboundgenerator.codeplex.com just shells out to the CrmSvcUtil.  It could be a different version though (by default it uses a local one in the XrmToolbox directory).  You could try replacing that CrmSvcUtil with the one that you've been using and see if it breaks, then you'd have proof that Microsoft broke something.  If it doesn't break, then I'd compare what the command line args are that are used to generate the file by the tool (As long as you have the setting enabled, it spits out the actual command line in the Entities.cs file) and what you're attempting to use.  Make sense?

    Tuesday, May 13, 2014 10:12 PM
  • Daryl, tried your suggestion. I was successful with the xrmearlyboundgenerator as-is from Codeplex. Then I swapped in the 6.0.0002.0042 crmsvcutil.exe and tried again, and that was successful. I swapped in the Microsoft.Xrm.Client.dll from my later SDK and that still worked. As soon as I swapped in Microsoft.Xrm.Sdk.dll (6.0.0002.0011 instead of the 6.0.0000.0206 included with xrmearlyboundgenerator), I got the clientcredentials error. So looks like the problem is actually with Microsoft.Xrm.Sdk.dll, not crmsvcutil.exe on its own.
    Tuesday, May 13, 2014 10:50 PM
  • I had the same problem. I was able to solve it by following this guide: 

    http://thinketg.com/strongly-typed-code-file-generation-with-crmsvcutil-exe-for-crm-2011-ifd-configurations-code

    Friday, May 23, 2014 12:48 PM
  • Thanks Claus, I was able to successfully generate my Xrm class against my CRM Online org using the steps and code at the provided link. I double checked, and it appears to match the class I generated with the 6.0.4 SDK.
    Friday, May 23, 2014 3:28 PM
  • I was having the same issue. The solution I found was, as others mention in this thread, using CRM 2011 CrmSvcUtil.exe.

    Dynamics CRM Certified Consultant (MB2-631,632,633)

    Friday, June 13, 2014 6:54 PM