How do I integrate LearnWise with Microsoft Dynamics?
This article describes how to register a LearnWise app in Azure AD and connect it to a help desk so that chat escalations create Dynamics 365 incidents automatically.
4 min readUpdated
On this page
When a learner escalates a conversation from the chat interface, LearnWise will:
- Authenticate to your Dynamics 365 environment using client credentials (no user session required).
- Look up or create a Dynamics contact record for the learner by email address.
- Create an incident (case) linked to that contact, populating the fields shown in the escalation form.
- Return the incident ID to the learner as confirmation.
The fields on the escalation form are fetched live from your Dynamics incident entity metadata — you do not need to configure them manually in LearnWise.
1. Register an app in Azure Active Directory #
In the Azure Portal (portal.azure.com):
- Azure Active Directory > App registrations > New registration.
- Name: something descriptive, e.g. LearnWise Helpdesk.
- Supported account types: Accounts in this organizational directory only.
- No redirect URI is needed.
- On the app overview page, note the Application (client) ID and Directory
(tenant) ID — you'll need both shortly. - Certificates & secrets → New client secret. Set an expiry you can manage,
copy the secret value immediately (it is hidden after you leave the page).
2. Grant the app access to Dynamics 365 #
Still in the App Registration section:
- API permissions > Add a permission > Dynamics CRM > Delegated permissions > user_impersonation. (Despite the name, this is the permission required for client-credentials access to Dynamics.)
- Click Grant admin consent for your tenant.
In your Dynamics 365 environment (https://<yourorg>.crm.dynamics.com):
- Settings > Security > Users > Application Users > New Application User.
- Set Application ID to the client ID from the previous step.
- Assign a security role that allows creating and reading incidents and contacts. The built-in Customer Service Representative role is sufficient; a custom minimal role is fine too.
3. Create the integration in LearnWise Admin #
Admin Panel > Help Desks > your help desk > Integration > Add integration > Dynamics.
| Form field | Where to find it |
|---|---|
| Name | Any label - used only in the admin UI |
| Base URL | Your Dynamics environment URL, e.g. |
| https://yourorg.crm.dynamics.com | |
| Tenant ID | Directory (tenant) ID from the app registration overview |
| Client ID | Application (client) ID from the app registration overview |
| Client Secret | The secret value you copied in step 1.3 |
On save, LearnWise validates the credentials by fetching an Azure AD token, then immediately pulls your incident entity's field metadata. If this succeeds the integration is marked valid and the field list is stored. If it fails, check that admin consent was granted and that the Application User is active in Dynamics.
What success looks like #
Once the integration is valid, the help desk's escalation form will display the fields from your Dynamics incident entity. When a learner escalates:
- A contact is looked up by email; if none exists, one is created automatically.
- An incident is created and linked to the contact. The learner sees the Dynamics ticket number as confirmation.
Limitations #
- Authentication: client credentials only — no per-user OAuth. All incidents are created under the Application User's identity.
- Incident entity only: LearnWise reads metadata from the incident entity exclusively. Custom entities are not supported.
- Supported field types: String, Memo, Picklist, Boolean, Integer, Decimal, DateTime. Lookup, Owner, Customer, State, Status, Virtual, and Unique Identifier fields are excluded from
the form automatically. - Picklist fields with no options are silently omitted from the form.
- File attachments are not supported.
- Token expiry: the client secret has a finite lifetime. When it expires, the integration becomes invalid and ticket creation stops (an alert will appear in the Alerts page). Rotate
the secret in Azure before expiry and update the integration credentials. - Updating or closing existing incidents from the chat interface is not supported.
- Reading case history into the chat assistant's knowledge base is not supported.
Troubleshooting #
| Symptom | Likely cause |
|---|---|
| Integration saves but is immediately marked invalid | Token fetch failed - verify Tenant ID, Client ID, and Client Secret are correct and that admin consent has been granted |
| Form shows no fields after setup | Metadata fetch succeeded but returned no usable attributes - check that the Application User’s security role includes read access to the incident entity definition. |
| 403 when a ticket is submitted | The Application User lacks permission to create incidents or contacts in Dynamics - review their assigned security role. |
| Ticket created but no contact linked | Contact lookup/creation silently failed (e.g. the user’s email was blank). The incident still exists in Dynamics without a customer binding. |
| Integration was valid, now showing an alert | The client secret has expired or been revoked. Generate a new secret in Azure, update the integration, and resolve the alert. |
Still stuck?
Ask the LearnWise assistant. It answers from these guides.
Related guides
- Developer Guide: Signed Context InjectionIntegrations
- How do I enable Context Injection in LearnWise?Integrations
- How do I enable SCORM content ingestion in Brightspace?Integrations
- How do I Install Google Analytics 4 Event Tracking?Integrations
- How do I integrate LearnWise with Freshdesk (Native)?Integrations