web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

CRM SDK Authentication with 3rd party claims WS-Fed service (not ADFS)

(0) ShareShare
ReportReport
Posted on by 10

We are trying to migrate from windows authentication to IFD using a 3rd party WS-Fed identity provider (Okta). 
We have completed the setup and the CRM site is accessible and uses Okta for it's authentication.

The problem we have now is trying to figure out how to get/send credentials when connecting to the SDK.
We have many custom applications that interface with the SDK, and many of them are (headless) console apps that simply used the credentials of the running job, or credentials stored in a config file to authenticate. Therefore, any authentication mechanism that relies on redirecting the process to the identity service for logon will not work. We need to pass the credentials to the connection. 

I've tried using:
var conn = new CrmServiceClient("AuthType=IFD;Url=https://mycrm.myorganization.org/DevCrm;HomeRealmUri=https://mycrm.myorganization.org;Domain=mydomain;Username=me@myorganization.org;Password=xx##!!xx");

...and I get a response of:
An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail. => An error occurred when processing the security tokens in the message.


Has anyone done this sort of thing? I've tried it using both a simple custom app as well as the XrmToolBox, and in both cases I was not able to establish a connection. Both seemed to want to redirect me to the Okta logon page. 

Thanks!


p.s. Am I the only one who thinks it odd that there's no developer / technical forum in this community?

I have the same question (0)
  • Suggested answer
    Johao Larios Profile Picture
    1,795 on at

    Hello there.

    This looks some deep issue. I would recommend you open a ticket with Microsoft directly. He have a team dedicated to the SDK and they cover this kind of things.

    This could be related to multiple things. My suggestion is first validate that you are using the latest available version of the SDK that matches with your CRM Version .

    Check .net version .

    Then, capture fiddler traces while reproducing the issue and provide them to MSFT.

    Regards,

  • CGList Profile Picture
    10 on at

    Yeah, we are on the latest and greatest versions of both the SDK and CRM. I too had thought about installing fiddler on the server and checking the activity - I think that's the next thing I'll try, along with check with MS support.

    Thanks,

    Chris

  • Adam Kachinske Profile Picture
    17 on at

    Did you ever find a resolution to this issue? I also have the same problem.  

  • siva Profile Picture
    5 on at

    Hi

    Have you found the solution for this issue.

    I am currently facing same situation that unable to connect non adfs claim based provider using sdk. If you have found the solution please could you advise me how you solved?

    Siva

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 72 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 29 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans