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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
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

I have the same question (0)
  • edmunch Profile Picture
    Microsoft Employee on at

    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.

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    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/

  • chris2 Profile Picture
    5 on at

    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);

                       }

                   }

               }

           }

  • Verified answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    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
    5 on at

    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

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Pallavi Phade Profile Picture

Pallavi Phade 102 Super User 2026 Season 1

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 55 Super User 2026 Season 1

#3
ManoVerse Profile Picture

ManoVerse 45 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans