Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

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

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?

  • siva Profile Picture
    siva 5 on at
    RE: CRM SDK Authentication with 3rd party claims WS-Fed service (not ADFS)

    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

  • Adam Kachinske Profile Picture
    Adam Kachinske 15 on at
    RE: CRM SDK Authentication with 3rd party claims WS-Fed service (not ADFS)

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

  • CGList Profile Picture
    CGList 10 on at
    RE: CRM SDK Authentication with 3rd party claims WS-Fed service (not ADFS)

    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

  • Suggested answer
    Johao Larios Profile Picture
    Johao Larios 1,795 on at
    RE: CRM SDK Authentication with 3rd party claims WS-Fed service (not ADFS)

    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,

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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans