Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

API deprecation of WS-Trust in April 2022 - How to test?

(0) ShareShare
ReportReport
Posted on by 5

Hi,

We have a .NET integration that uses the OrganizationProxyService to connect with CRM Online and was notified by another vendor this will be retired by Microsoft in April of 2022.

The switch to use OAuth and the CRMServiceClient was easy enough but I would like to test the code in an environment with WS-Trust completely disabled.

I created a new Sandbox and even a trial CRM instance which should have WS-trust disabled, but the OrganizationProxyService calls with client credentials passed in still are returning data as expected.  New environments are suppose to have WS-trust disable. 

Is there any way to disable WS-Trust on a instance to prepare for the eventual switch in April 2022?

Thanks

  • chris2 Profile Picture
    chris2 5 on at
    RE: API deprecation of WS-Trust in April 2022 - How to test?

    Hi,

    I will see if it is possible to create a trial in another region.  It seems strange a new trial created in Nov 2021 in CRM3 would not have WS-Trust disabled already.

    Is there anyway to confirm when this would happen in advance of April 2022?

    Thanks,

    Chris

  • Verified answer
    Bipin D365 Profile Picture
    Bipin D365 28,959 Super User 2024 Season 1 on at
    RE: API deprecation of WS-Trust in April 2022 - How to test?

    Hi,

    I have tried same code on India region Trial instance and I am getting below error.

    CR27.PNG

    As per below official docs page Deprecation is gradullay comping to all regions.

    https://docs.microsoft.com/en-us/power-platform/important-changes-coming#deprecation-of-office365-authentication-type-and-organizationserviceproxy-class-for-connecting-to-dataverse

    I see you have created your trial instance in Canada region which is why CRM3 and I have tried in CRM region CRM8.

    If you really want to try you code then I would recommend you create trial instance in India region or wait for Canada region for deprecation feature.

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • chris2 Profile Picture
    chris2 5 on at
    RE: API deprecation of WS-Trust in April 2022 - How to test?

    Hi Bipin,

    The below method returns the contacts from the trial CRM instance, my understanding is the use of OrganizationServiceProxy at all should be failing and the code should be changed to use CrmServiceClient instead.

    Thanks,

    Chris

    private static void getContacts()

           {

               using (OrganizationServiceProxy serviceProxy = new OrganizationServiceProxy(

                                                              new Uri("org-xyzabc.api.crm3.dynamics.com/.../Organization.svc"),

                                                              null,

                                                              getCredentials(),

                                                              null))

               {

                   using (OrganizationServiceContext orgServiceCtx = new OrganizationServiceContext(serviceProxy))

                   {

                       var contactQuery = from c in orgServiceCtx.CreateQuery("contact")

                                          select new

                                          {

                                              Contact = new

                                              {

                                                  ContactId = c["contactid"],

                                                  ContactStateCode = c.Attributes.Contains("statecode") ? c["statecode"] : 999,

                                                  FirstName = c.Attributes.Contains("firstname") ? c["firstname"] : "?"

                                              }

                                          };

                       foreach (var contact in contactQuery)

                       {

                           Console.WriteLine("[+] Contact ID: " + contact.Contact.ContactId + " -> " + contact.Contact.FirstName);

                       }

                   }

               }

           }

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,959 Super User 2024 Season 1 on at
    RE: API deprecation of WS-Trust in April 2022 - How to test?

    Hi,

    Would you be able to share your code which you are using to connect to CRM?

    Have you tried creating CRM trial instance in US(North America) region?

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • edmunch Profile Picture
    edmunch on at
    RE: API deprecation of WS-Trust in April 2022 - How to test?

    You are correct, new environments should have WS-Trust disabled.  I recommend creating a case with Microsoft so they can investigate this in your tenant.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,466 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans