SaaS News Hubb
Advertisement
  • Home
  • News
  • Software Engineering
  • Software Development
  • SAAS Applications
  • Contact Us
No Result
View All Result
  • Home
  • News
  • Software Engineering
  • Software Development
  • SAAS Applications
  • Contact Us
No Result
View All Result
SaaS News Hubb
Home SAAS Applications

How to migrate from Passport authentication type to OAuth 2.0

by admin
April 7, 2022
in SAAS Applications
0
SHARES
0
VIEWS
Share on FacebookShare on Twitter


Hello,

Got this error while attempting to connect to Dynamics CRM 365 OrganizationService:

Error Message: 

System.ServiceModel.FaultException
HResult=0x80131501
Message=An error occurred when processing the security tokens in the message:You are using Ws-Trust authentication which has been deprecated and no longer supported in your environment. Please use OAuth2.0 authentication.
Source=mscorlib
StackTrace:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.Xrm.Sdk.IOrganizationService.Create(Entity entity)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.CreateCore(Entity entity)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.Create(Entity entity)
at Microsoft.Xrm.Client.Services.OrganizationService.<>c__DisplayClassd.b__c(IOrganizationService s)

Used this “Ws-Trust authentication which has been deprecated and no longer supported in your environment. Please use OAuth2.0 authentication” to search around and the answer was to change the connection string to something like this: 

connectionstring = “AuthType=OAuth;Username=jsmith@contoso.onmicrosoft.com; Password=passcode;Url=contosotest.crm.dynamics.com;AppId=51f81489-12ee-4a9e-aaae-a2591f45987d; RedirectUri=app://58145B91-0C36-4500-8554-080854F2AC97;LoginPrompt=Auto”

But I tried that (substituted with my own secrets) but it still gave me same error.      

Here are the codes to connect:

using Microsoft.Xrm.Client;

….

private readonly CrmConnection _crmServiceConnection;

in the constructor, set:

    _crmServiceConnection  = CrmConnection.Parse(dynamicsConfigurationProvider.ConnectionString);

And the connection is used in 

{
using (var service = new OrganizationService(_crmServiceConnection))
{
var accountId = service.Create(dynamicsAccount);

}
}

I looked up the OrganizationService meta data and it seemed old:

#region Assembly Microsoft.Xrm.Client, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
// C:Users.userid.nugetpackagesmicrosoft.crmsdk.extensions7.1.0.1libnet45Microsoft.Xrm.Client.dll
// Decompiled with ICSharpCode.Decompiler 6.1.0.5902
#endregion

Thanks in advance for your help!!



Source link

Previous Post

SourceDay Extends NetSuite’s Inbound Shipment Module

Next Post

How Technology Is Forging the Future of Sales

Related Posts

SAAS Applications

Internal emails are being tracked in Dynamics 365

May 18, 2022
SAAS Applications

The Future of Healthcare Facilities Management with Dynamics 365 BC

May 18, 2022
SAAS Applications

Acumatica xRP Framework: Reusable ASPX Definitions

May 18, 2022
SAAS Applications

Sugar Sell Editions: The Ultimate Guide

May 17, 2022
SAAS Applications

Dynamics CRM v8.2 – Guide to upgrading SQL Server 2012 to 2016

May 17, 2022
SAAS Applications

Does Acumatica Have an Integrated CRM?

May 17, 2022

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Most Popular

Software Engineering

Building out a managed Kubernetes service is a bigger job than you think

May 18, 2022
Software Engineering

What Is Agile? A Philosophy That Develops Through Practice

May 18, 2022
Software Engineering

Technical Debt With Lee Atchison

May 18, 2022
Software Development

Global skills and literacy shortfalls in data and analytics

May 18, 2022
Software Development

Why Full Stack Web Development Is Still a Viable Path

May 18, 2022
SAAS Applications

Internal emails are being tracked in Dynamics 365

May 18, 2022
SAAS Applications

The Future of Healthcare Facilities Management with Dynamics 365 BC

May 18, 2022
SAAS Applications

Acumatica xRP Framework: Reusable ASPX Definitions

May 18, 2022
News

Block rival SpotOn lands $300M at $3.6B valuation after doubling ARR last year – TechCrunch

May 18, 2022

© 2022 Sass News Hubb All rights reserved.

Use of these names, logos, and brands does not imply endorsement unless specified. By using this site, you agree to the Privacy Policy

Navigate Site

  • Home
  • News
  • Software Engineering
  • Software Development
  • SAAS Applications
  • Contact Us

Newsletter Sign Up

No Result
View All Result
  • Home
  • News
  • Software Engineering
  • Software Development
  • SAAS Applications
  • Contact Us