Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

CRM 2011: The device authentication failed!

$
0
0

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:

<connectionStrings>

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

 </connectionStrings>

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?


Viewing all articles
Browse latest Browse all 82002

Trending Articles