CRM 2011: The device authentication failed! RRS feed

  • Question

  • I am creating a desktop application that will connect to an instance of CRM Online. I've generated my device id and password using the tool supplied with the SDK, but I am still receiving an error of "The device authentication failed!". This is in my app.config:

        <add name="Xrm" connectionString="Url=https://xxxx.crm.dynamics.com/; Username=user@123.com; Password=password; DeviceID=deviceid; DevicePassword=password;"/>

    This is my code:                        

    Xrm.XrmServiceContext crmContext = new Xrm.XrmServiceContext("Xrm");

    List<Account> orgs = new List<Account>();

    orgs = (from c in crmContext.AccountSet
                         where c.xxx_AutoCreateDuesHistory == false
                         where c.StateCode.Value == 0
                         select c).ToList<Account>();

    The error is being thrown when trying to run the LINQ query. Any ideas why I am getting this error?

    Tuesday, August 13, 2013 3:36 PM