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,...
Answered

Change WS-Trust security protocol to Office 365 authentication

(1) ShareShare
ReportReport
Posted on by 455

Hello,

I got an email about "D365 Platform Modernization: Deprecate legacy authentication-WS-Trust" last week. I compared my code with the one mentioned in that email about how to determine that my code is using WS-Trust, I found that I was using the OrganizationServiceProxy class, it belongs to WS-Trust.

I found an article published in 2019 on the official website about how to use CrmServiceClient to connect to organization services. Please see the following screenshot. But I feel like the code provided in this screenshot also belongs to WS-Trust, not office 365.

I just want to make sure that the way I connect to the organization service given in the following screenshot belongs to WS-Trust, and if I want to change it based on the code in it, how do I need to modify this code to change my security protocol from WS-Trust to Office 365.

0844.png

I have the same question (0)
  • David Jennaway Profile Picture
    14,065 on at

    That example is using WS-Trust. If you use AuthType=Office365 with the CrmServiceClient it will use WS-Trust. To avoid using WS-Trust, change the AuthType to OAuth. That should be all you need to change, though any references to CrmServiceClient.OrganizationServiceProxy should be changed to CrmServiceClient.IOrganizationService

  • edmunch Profile Picture
    on at

    David is correct , you should only need to change AuthType to Oauth.

  • Stone Huang Profile Picture
    455 on at

    Thank you very much for your answer.

    I just tried what you said, changed office 365 to Oauth, but the code hit an error, show that need to provide client id and redirect id.

    Do you know what are client id and redirect id? I haven't used these two things before.

    Is there a way not to use client and redirect id and to change WS-Trust to Office 365?

    8750.jpg

  • Verified answer
    Stone Huang Profile Picture
    455 on at

    I just looked it up on the Internet. It seems that if the authentication type is oauth, there must be client id and redirect uri. I know something about client id, but this redirect uri? Its format is app://58145B91-0C36-4500-8554-080854F2AC97, I want to know what the back GUID stands for and where it came from.

    Isn't there a way of authentication type that is Oauth, and doesn't need client id and redirect uri?

  • Jim Daly Profile Picture
    on at

    Details are here: docs.microsoft.com/.../authenticate-office365-deprecation

  • malik1126 Profile Picture
    32 on at

    How to use Oauth bearer token in SOAP request / SOAP Body ?

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 96 Super User 2025 Season 2

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans