Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Error while accessing the IFD enabled On premise CRM using SDK or plug in

Posted on by Microsoft Employee

Hi Team,

whenever we try to connect to IFD environment using SDK code or plugin facing an below error.

"The authentication endpoint Username was not found on the configured Secure Token Service!".

the error occurred while we try to access the available organizations on CRM serve using Discovery url.

thank you.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error while accessing the IFD enabled On premise CRM using SDK or plug in

    Trying to access the Organization details by using below code by using discovery serivce.

    public static OrganizationDetailCollection DiscoverOrganizations(IDiscoveryService service)
    {
    RetrieveOrganizationsRequest orgRequest = new RetrieveOrganizationsRequest();
    RetrieveOrganizationsResponse orgResponse =
    (RetrieveOrganizationsResponse)service.Execute(orgRequest);

    return orgResponse.Details;
    }

    getting below error even after changing the port number of ADFS service as mentioned.

    System.NotSupportedException: The authentication endpoint Username was not found on the configured Secure Token Service!
    at Microsoft.Xrm.Sdk.Client.IssuerEndpointDictionary.GetIssuerEndpoint(TokenServiceCredentialType credentialType)
    at Microsoft.Xrm.Sdk.Client.AuthenticationCredentials.get_IssuerEndpoint()
    at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.AuthenticateInternal(AuthenticationCredentials authenticationCredentials)
    at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.AuthenticateFederationInternal(AuthenticationCredentials authenticationCredentials)
    at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.Authenticate(AuthenticationCredentials authenticationCredentials)
    at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.Authenticate(ClientCredentials clientCredentials)
    at Microsoft.Xrm.Sdk.Client.DiscoveryServiceConfiguration.Authenticate(ClientCredentials clientCredentials)
    at Microsoft.Xrm.Sdk.Client.ServiceProxy`1.AuthenticateClaims()
    at Microsoft.Xrm.Sdk.Client.ServiceProxy`1.AuthenticateCore()
    at Microsoft.Xrm.Sdk.Client.ServiceProxy`1.Authenticate()
    at Microsoft.Xrm.Sdk.Client.ServiceProxy`1.ValidateAuthentication()
    at Microsoft.Xrm.Sdk.Client.ServiceProxy`1.get_ServiceChannel()
    at Microsoft.Xrm.Sdk.Client.ServiceContextInitializer`1.Initialize(ServiceProxy`1 proxy)
    at Microsoft.Xrm.Sdk.Client.ServiceContextInitializer`1..ctor(ServiceProxy`1 proxy)
    at Microsoft.Xrm.Sdk.Client.DiscoveryServiceContextInitializer..ctor(DiscoveryServiceProxy proxy)
    at Microsoft.Xrm.Sdk.Client.DiscoveryServiceProxy.Execute(DiscoveryRequest request)
    at Microsoft.Crm.Sdk.ServerConnection.DiscoverOrganizations(IDiscoveryService service) 

  • David Jennaway Profile Picture
    David Jennaway 14,063 on at
    RE: Error while accessing the IFD enabled On premise CRM using SDK or plug in

    Is the issue just when using the Discovery service, or also when using Organization.svc ? If it's the latter, then the links in the above post should help. If CRM and ADFS are on the same server, the most likely issue is that ADFS and the Sandbox service are both trying to use the same port

    If the issue is just with the Discovery service, then the problem is likely to do with an incorrect DNS name, or DNS resolution for the Discovery Service Url, or back to the issues above if the Discovery Service is installed on a separate server from the Organization.svc

  • Suggested answer
    Kokulan Profile Picture
    Kokulan 18,048 on at
    RE: Error while accessing the IFD enabled On premise CRM using SDK or plug in

    Hi

    The error message seems to indicate something wrong with your ADFS configuration.

    Please refer to the links below

    support.clickdimensions.com/.../115001157433--The-authentication-endpoint-Username-was-not-found-on-the-configured-Secure-Token-Service-Error-When-Registering

    blog.gagepennisi.com/.../the-authentication-endpoint-username.html

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans