Developer forum

Forum » Integration » Business Central SOAP service using OAuth2

Business Central SOAP service using OAuth2

Martin Moen
Reply

Is it possible to use the new OAuth2 authentication on a "old fashioned" SOAP DWWebService?
We are trying to get it to work on a cloud hosted BC installation, but we do get this error:

AcquireTokenSilent failed. EndpointAuthentication id: 1. Error: Could not load file or assembly 'System.Security.Cryptography.ProtectedData, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

We have not tried OData yet, but just want to know if it is supposed to work with SOAP or not.

Also. When setting up OAuth2 in BC we are asked to setup a Callback\Reply URL. What should it be, and arent we supposed to add that in the enpoint management too? Trying to wrap my head around it. We want to use OAuth2 for all installations where it is possible from now on.


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Martin,
no, it is not possible to use OAuth2 with "old fashioned" SOAP DWWebService, since it requires the access token generation which is probably not available there.
 

The error you get is because you are missing the package/dll in the bin, so you can find it here and download the 5.0.0 version.

The OAuth2: A method of authentication managed in Microsoft Azure Active Directory.
I've attached the file with instructions of how to setup your app in the AD.
The authenticaion url should be in the format shown below, just use your website host instead and site must use https protocol:
https://test.com/Admin/Public/Module/EndpointManagement/EndpointAuthorization.aspx
Or it can be a localhost app, see the second url (hosted locally).




BR, Dmitrij

 

You must be logged in to post in the forum