This guide shows how to connect Mavenoid to create customers and incidents in Microsoft Dynamics 365 using the Microsoft Web API with OAuth 2.0.
Admin Access To Mavenoid: Contact your Mavenoid representative if you lack admin permissions.
OAuth 2.0 Application Registration: Register an app in Azure AD for OAuth access.
To set up OAuth 2.0, you’ll need:
Tenant ID (Directory ID)
Client ID
Client Secret
D365 Environment URL
Get your Tenant ID, Client ID, and Client Secret by following the guide on registering an application. Make sure to configure it as a Web app and set the Client Secret to never expire.
Next, register your external application to expose Web APIs, as detailed here, and configure user permissions to query and create contacts, ensuring you include the offline_access
permission.
Use the Call External API action to get an access token:
Make a POST request to https://<D365 URL>/.default
.
Set the payload type to URL-Encoded Form and include these parameters:
client_id
client_secret
grant_type
(set to client_credentials
)
Scope
(set to your D365 instance URL + ./default
)
The access token returned will be used to call Dynamics endpoints for querying and creating contacts and incidents. For more details, refer to the following resources: