How to do it...

To consume a Dynamics 365 for Operations service using SOAP, follow these steps:

  1. Create a new project; this time, choose Visual C# from the Templates node and then Console Application from the right. Name the project ConServiceTest and place it in the project folders that we set up for source control. Ensure that the namespace is also ConServiceTest.
  2. We will now need to install some NuGet packages. Within Visual Studio, navigate to Tools | Nuget Package Manager | Package Manager Console.
  3. In the Package Manager console, type the following command:
Install-Package Microsoft.IdentityModel.Clients.ActiveDirectory 
  1. Right-click on the References node in the project and choose Add Service Reference.
  2. Enter https://usnconeboxax1aos.cloud.onebox.dynamics.com/soap/services/ConWHSServices ...

Get Extending Microsoft Dynamics 365 for Operations Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.