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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Regarding Retiring WS-...
Power Apps
Unanswered

Regarding Retiring WS-Trust authentication protocol for connecting to Dataverse

(0) ShareShare
ReportReport
Posted on by 2

Hello ,

Hope You are doing well.
I am one of the developers working on Microsoft technologies.
I have a query about the WS-Trust authentication protocol which is going to be retired soon.
I am using below different approaches for the Dynamics CRM authentication.
 
Online Authentication
 
                var conn = new CrmServiceClient($@"AuthType=ClientSecret;url={organizationUri};ClientId={clientId};ClientSecret={clientSecret}");

                conn.OrganizationWebProxyClient.InnerChannel.OperationTimeout = new TimeSpan(0, Convert.ToInt16(ConfigurationManager.AppSettings["MDC_ServiceTimeOut"]), 0);
                return conn.OrganizationWebProxyClient != null ? conn.OrganizationWebProxyClient : (IOrganizationService)conn.OrganizationServiceProxy;

 
OnPremise Authentication
 
              String connstr = "authtype=Office365;Url=" + _OrganizationUri + ";Domain=" + _domain + ";Username=" + _userName + ";Password=" + _password + "";
              ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
              CrmServiceClient conn = new CrmServiceClient(connstr);
               if (conn.IsReady)
               {
                    service = conn.OrganizationWebProxyClient != null ? (IOrganizationService)conn.OrganizationWebProxyClient : (IOrganizationService)conn.OrganizationServiceProxy;
               }
 
So for the above, all two approaches do I need to make any changes?
Please guide me on this.
Your help would be really appreciated.
Awaiting Your positive reply.
I have the same question (0)
  • a33ik Profile Picture
    3,306 Most Valuable Professional on at

    Hello,

    I'm not sure why do you need proxy at all. I use the following code in my apps that works transparently for both Online and On-Prem:

     

    var conn = new CrmServiceClient("Your Valid Connection String");
    
    if (!conn.IsReady)
    {
    //handle the connection issue here
    }
    
    //use conn object here
  • cchannon Profile Picture
    4,702 Moderator on at

    MSFT published a page on just this topic to help guide you away from WSTrust and the OrganizationServiceProxy class. I think you'll find the answers you're looking for here.

     

    Use of Office365 authentication with Microsoft Dataverse (Microsoft Dataverse) - Power Apps | Microsoft Docs

  • sanket1828 Profile Picture
    2 on at

    This works fine. I have only concern that how We can authenticate the user which is not on cloud and having port number with the organization URI. see below example URL

    "https://crm.organization.com:444/.

    I am trying to to using oath type "Office365". but not getting succeeded. 

    Please advice on this.

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 Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 490

#2
WarrenBelz Profile Picture

WarrenBelz 427 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 381

Last 30 days Overall leaderboard