Hi all
I am looking to connect Visual Studio to CRM Online, in a situation where we are dealing with a customer's CRM Online which has been federated with their AD for single-sign on. At this point I have been unable to connect from outside their network, using a very similar connection string to what is working with another CRM Online instance that isn't federated.
For the working instance, and connecting via Microsoft.Xrm.Tooling.Connector, I am using a connection string like
AuthType=Office365; Url=workingcrminstance.crm6.dynamics.com; Username=brad_sprigg@workinginstance.onmicrosoft.com; Password=xxxxxxx
Using the customer's CRM Online instance, I use a similar connection string and I am unable to connect. The CrmServiceClient object returns a LastCrmError of "Unable to Login to Dynamics CRMOrganizationServiceProxy is null".
Using Fiddler, I can see it redirect to the customers ADFS and then there is an error 500 code when it tries to get a response from /adfs/services/trust/13/usernamemixed
The message returned is "The security token could not be authenticated or authorized."
When I log into their CRM Online via a browser, I enter the email address in the CRM Online login screen, which redirects to the customers ADFS, where the login is instead entered in the format DOMAIN\username.
Has anyone dealt with this type of environment with the SDK and how did you manage to connect to their instance?
edit: Incidentally, trying to connect with XrmToolbox returns the same message of "The security token could not be authenticated or authorized."
*This post is locked for comments