locked
IFD error RRS feed

  • Question

  • Hi All,

    When I am trying to connect to organisation through C# code(console application (using IOrganisation proxy ))with IFD I am getting following error "The authentication endpoint Username was not found on the configured Secure Token Service!"

    Please suggest . I am using following code

    using (OrganizationServiceProxy _serviceProxy = new OrganizationServiceProxy(organizationUri, homeRealmUri, userCredentials, deviceCredentials))

    suggest at  http://msdn.microsoft.com/en-us/library/gg334502.aspx

    Thanks in advance

    Thursday, November 8, 2012 1:23 PM

Answers

  • Hi All,

    This issue is resolved.

    Thank you.


    Nishikant Chaudhari

    • Marked as answer by kant7nishi Tuesday, December 4, 2012 9:07 AM
    Tuesday, December 4, 2012 9:07 AM

All replies

  • Hi,

    you can try taking a look at this thread and at this post.

    Greetings,

    Pavlos


    Please mark this reply as an answer and vote it as helpful if it helps you find a resolution to your problem.
    View my latest gallery contribution here.
    Visit my blog here.

    Thursday, November 8, 2012 1:36 PM
  • Hi,

    IOrganizationService _service = null;

    ClientCredentials userCredentials = new ClientCredentials(); userCredentials.UserName.UserName = userName; userCredentials.UserName.Password = userPassword; IServiceConfiguration<IDiscoveryService> discoveryConfiguration = ServiceConfigurationFactory.CreateConfiguration<IDiscoveryService>(new Uri(discoveryUri)); SecurityTokenResponse userResponseWrapper = discoveryConfiguration.Authenticate(userCredentials); DiscoveryServiceProxy _discServiceProxy = new DiscoveryServiceProxy(discoveryConfiguration, userResponseWrapper); IServiceConfiguration<IOrganizationService> serviceConfiguration = ServiceConfigurationFactory.CreateConfiguration<IOrganizationService>(new Uri(organizationUri)); OrganizationServiceProxy _orgServiceProxy = new OrganizationServiceProxy(serviceConfiguration, userResponseWrapper);

    _orgServiceProxy.EnableProxyTypes(); _orgServiceProxy.CallerId = new Guid(userId); this._service = (IOrganizationService)_orgServiceProxy;


    *Organization uri : https://../XRMServices/2011/Organization.svc

    *Discovery uri : https://../XRMServices/2011/Discovery.svc

    *userId : If you give userId , all records that you created will belongs that user


    You can create crm service using that code..


    • Edited by PolatAydin Monday, November 12, 2012 8:40 PM
    • Proposed as answer by PolatAydin Monday, November 12, 2012 9:01 PM
    Monday, November 12, 2012 8:39 PM
  • Thanks PolatAydin,

    but still I am getting same error. at this line at  userCredentials

    SecurityTokenResponse userResponseWrapper = discoveryConfiguration.Authenticate(userCredentials);

    Monday, November 19, 2012 6:10 AM
  • Hi,

    I think there is a problem in your adfs server configuration because the code i sent to you works perfectly.

    Please try this ;

    1. Manage the ADFS server.
    2. Go to ADFS > Service > Endpoints.
    3. Find the URL path for /adfs/services/trust/13/username of type WS-Trust 1.3.
    4. Modify it so that it has a value of Yes for both the "Enabled" and "Proxy Enabled" settings.

    Monday, November 19, 2012 7:18 PM
  • Hi  Pavlos

    I have made chnges as suggested in link but still getting same error.

    can you suggest more.


    Nishikant Chaudhari


    • Edited by kant7nishi Tuesday, November 20, 2012 8:52 AM
    Tuesday, November 20, 2012 8:51 AM
  • Hi PolatAydin,

    I have made chnges as you suggested but still I am getting same error.


    Nishikant Chaudhari

    Tuesday, November 20, 2012 8:56 AM
  • Can you connect to the crm with that user from your browser? (the user that you wanted to create crm service)
    Tuesday, November 20, 2012 11:26 AM
  •   Hi PolatAydin,

    I can connect to the crm with that user from  browser.


    Nishikant Chaudhari

    Tuesday, November 20, 2012 1:03 PM
  • Hi Nishikant

    it could be a resolution or routing issue blocking the connection.

    Make sure that there are external DNS entries for the path to your ADFS server (your crm url needs to resolve externally). Also, make sure that your firewall permits external access to the ADFS server.
    Tuesday, November 20, 2012 10:13 PM
  • Hi All,

    This issue is resolved.

    Thank you.


    Nishikant Chaudhari

    • Marked as answer by kant7nishi Tuesday, December 4, 2012 9:07 AM
    Tuesday, December 4, 2012 9:07 AM