Hello Everyone,

I have simple Task to do which is to connect my Custom Web service to a dynamic CRM 2016(V8.2) On-Premise SDK, however the CRM environment uses Pingfederate Federation and I'm getting the below error

"Unable to login to Dynamics CRM, Error was : The authentication endpoint Username was not found on the configured Secure Token Service!
The authentication endpoint Username was not found on the configured Secure Token Service!Unable to Login to Dynamics CRM
Unable to Login to Dynamics CRM"

My connection to the SDK is done as follows:


IOrganizationService _service = null;
string connectionString = ConfigurationManager.ConnectionStrings["crmConnection"].ConnectionString;
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;
CrmServiceClient conn = new Microsoft.Xrm.Tooling.Connector.CrmServiceClient(connectionString);

and in here is the connectionstring that I am using:

<connectionStrings>
<add name="myConnection" connectionString="AuthType=AD;Url=xxxxxxxx.com/.../Organization.svc; Domain=xxxx;Username=xxxx; Password=xxxx;"/> </connectionStrings>

Obviously this is caused by Pingfederate because when I remove the Fedaration from CRM level I can connect normally to the SDK, and also when I keep the Pingfederate and connect to CRM using normal browsing, I got redirected to Pingfederate authentication page and when I enter correct credentials I got redirected to my CRM organization

I need to know how can I connect my Webservice to the CRM and pass these credentials programmatically? or how can I pass this Layer of Authentication?

Thank you