locked
Office 365 Authentication... (Error: The connection's device credentials must be specified.) RRS feed

  • Question

  • Hi Everyone.

    I have a problem. I am using the Simplified connection to connect to office 365.. http://msdn.microsoft.com/en-us/library/jj602970.aspx

    However, I get an error "The connection's device credentials must be specified." when I run this LINQ Query.

     public string GetConfigValue(string key, IOrganizationService service)
            {
                var ocontext = new OrganizationServiceContext(service);
    
                var priorityMatrix = (from itil in ocontext.CreateQuery("apitil_itilsetting")
                                      where (string)itil["apitil_key"] == key
                                            && itil["apitil_key"] != null
                                            && itil["apitil_value"] != null
                                            && ((OptionSetValue)itil["statuscode"]).Value == 1
    
                                      select new
                                      {
                                          priorityMx = itil["apitil_value"]
                                      }
    
                                     ).FirstOrDefault();
    
                return priorityMatrix != null ? priorityMatrix.priorityMx.ToString() : null;
            }
    Do I really need the device ID and device password in my app.config file? I thought the authentication of the office365 does not need this?

    Sunday, September 8, 2013 4:15 PM

All replies

  • Are you sure that your CRM organization uses Office365 authentication?

    The device credentials are required only when connect to CRM with liveid authentication


    My blog: www.crmanswers.net

    Sunday, September 8, 2013 4:26 PM
  • Thanks for your reply Guido.

    I presume that this screenshot says it all as it says liveid as authentication type. I presume it should say office365?

    Sunday, September 8, 2013 4:58 PM
  • Can you please post an example of the connection string you are using?

    Please feel free to contact me using the following methods

    Monday, September 9, 2013 10:07 AM