dynsvcdiscovery 0.11.0
dotnet tool install --global dynsvcdiscovery --version 0.11.0
dotnet new tool-manifest
dotnet tool install --local dynsvcdiscovery --version 0.11.0
#tool dotnet:?package=dynsvcdiscovery&version=0.11.0
nuke :add-package dynsvcdiscovery --version 0.11.0
Dynamics 365 Service Endpoint Discovery Tool
A CLI+GUI tool to explore Dynamics 365 Finance & Operations APIs. We use the service discovery endpoints to build a map of available services, then query the relevant SOAP endpoints to build best-guess type definitions for the data contracts used in the requests.
⚠️ Warning ⚠️
Excessive use of this tool can result in bad things! These include, but are not limited to, HTTP 429 (too many requests) responses and system socket exhaustion. These problems go away on their own, but are annoying to deal with. Consider using the filtering options to reduce redundant requests.
⬇️⌨️ Installation (CLI)
Install as a .NET tool:
dotnet tool install -g dynsvcdiscovery
Compile from source (requires .NET 6.0 SDK or later):
dotnet tool restore
dotnet cake --target InstallCli
Either way, make sure .NET tools are available in your PATH:
# ~/.bashrc, .zhhrc, etc.
export PATH="$HOME/.dotnet/tools:$PATH"
⬇️🖼️ Installation (GUI)
Direct download: Download the latest release (MSIX bundled). Run Install.ps1, or trust the certificate and run the MSIX file manually.
Compile from source (requires .NET 6.0 SDK or later):
dotnet tool restore
dotnet cake --target InstallGui
📐 Setup
You'll need an Azure application which can communicate with your Dynamics 365 instance. If you don't have one, here's how you can set one up:
Common
Create an Azure Application and configure it to communicate with your Dynamics environment.
Under Overview, copy the Application (client) ID. Save this for later.
Staying under Overview, copy the Directory (tenant) ID. Save this for later.
Under Manage > API Permissions, add the permission Ax.FullAccess (you can search for it using its service principal ID, f92c3f85-4759-4901-810d-5da8943dea39). Grant admin consent for your organisation.
In Dynamics, navigate to System Administration > Setup > Entra ID Applications, and add a new record with the Application (client) ID, assigned to an appropriate user. Remember to click "Save"!
Application Flows
In your Azure Application, under Manage > Certificates & secrets, add a new client secret. Save this for later.
User Flows
In your Azure Application, under Manage > Authentication, add a redirect URI for mobile and desktop applications: http://localhost:59445. In the same page, set "Allow public client flows" to "Yes".
⌨️ Usage (CLI)
Using only required parameters will map all discoverable service endpoints.
Application auth:
dynsvcdiscovery \
-c '<your-client-id>' \
-s '<your-client-secret>' \
-r 'https://<your-org-id>.operations.dynamics.com' \
-t 'https://login.microsoftonline.com/<your-tenant-id>/oauth2/token'
User auth:
dynsvcdiscovery \
-c '<your-client-id>' \
--tenant-id '<your-tenant-id>' \
-r 'https://<your-org-id>.operations.dynamics.com'
Additional options and sub-commands can be found using dynsvcdiscovery -?.
🐛 Debug
Failed HTTP requests are not treated as errors. Instead, their relevent group/service/operation is left unpopulated.
⌨️ Command Line
To diagnose errors, set the log level to Warning and redirect standard error to a different destination.
dynsvcdiscovery \
-csrt ... \
--log-level Warning \
>services.json \
2>dynsvcdiscovery.log
For more verbose results, set the log level to Trace (--log-level|-l Trace). You may also want to use --log-stream 2|StdErr to divert all logging to the error stream, so as not to interfere with the collection you're exporting.
🖼️ Graphical Interface
Errors are presented as in-app notifications as they happen.
To review, click the version number at the bottom right of the window to open the logs folder.
✏️ Contributors' Notice
The use of AI-generated code is strictly prohibited in this repository. See CONTRIBUTING.md.
🪪 License
This code is released under the MIT license. See LICENSE.md.
🔒 Security
Please report any security concerns to the maintainer of this repository via email. See SECURITY.md.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.