locked
Connection string for named user not resolving properly RRS feed

  • Question

  • Hi Everyone,

    I am working on a WCF Service that is communicating with an on-premise Dynamics 365 instance. The service is using windows authentication, then connects to CRM with Xrm.Tooling.Connector as a specified dedicated user. My problem is that even though the user credentials are specified in the connection string, when I instantiate the CrmServiceClient it still holds the CallerId of the logged in user instead of the dedicated user (the logged in user is an existing CRM user as well, it just does not have the same elevated permissions as the dedicated user). I conducted a test with a console application connecting to CRM with the same connection string, but it resolves the credentials properly, so something must be different on the service configuration.

    Any ideas on why the logged in user's credentials are being passed through instead of using the named user in the connection string?

    Thanks,

    Adam

    Friday, September 29, 2017 1:59 PM

All replies

  • Hi,

    When you create the service you need to set the credential on the service.

    If that doesn't work, you could have code that says "use default". Take that out.

    If that doesn't work, you credentials object is a collection, and your code could be referring to the first credential in that collection which may be the wrong one.

    regards,

    Don

    Thursday, October 5, 2017 2:57 AM