Real-time Webhooks
Configure Power Automate to sync Dynamics 365 changes to AuthScape in real-time
Real-time Webhooks with Power Automate
This guide shows you how to set up a Power Automate flow that automatically sends Dynamics 365 contact changes to AuthScape in real-time.
What You'll Need
- Access to Power Automate
- Your AuthScape domain URL
- Your CRM connection ID (found in User Management > CRM Integration)
Option 1: Create Flow Manually (Recommended)
This is the recommended approach as it doesn't rely on legacy import features.
Step 1: Create a New Flow
- Go to Power Automate
- Click + Create in the left sidebar
- Select Automated cloud flow
- Name it "Sync Contacts to AuthScape"
- Search for "When a row is added, modified or deleted" (Microsoft Dataverse)
- Select it and click Create
Step 2: Configure the Trigger
Configure the Dataverse trigger with these settings:
| Setting | Value |
|---|---|
| Change type | Added or Modified |
| Table name | Contacts |
| Scope | Organization |
| Select columns | firstname,lastname,emailaddress1,telephone1,statecode |
Step 3: Add HTTP Action
- Click + New step
- Search for HTTP and select the HTTP action (not HTTP + Swagger)
- Configure it with these settings:
| Setting | Value |
|---|---|
| Method | POST |
| URI | https://YOUR-DOMAIN/api/crm/webhook/dynamics/YOUR-CONNECTION-ID |
Replace YOUR-DOMAIN and YOUR-CONNECTION-ID with your actual values.
- Click Show advanced options
- Add a header:
- Key:
Content-Type - Value:
application/json
- Key:
Step 4: Configure the Body
In the Body field, build the JSON by typing the structure and inserting Dynamic content for the field values.
- Click in the Body field
- Paste this JSON structure:
{"MessageName": "Update","PrimaryEntityName": "contact","PrimaryEntityId": "","InputParameters": [{"key": "Target","value": {"firstname": "","lastname": "","emailaddress1": "","telephone1": "","statecode": ""}}]}
- Now replace each empty
""value with Dynamic content:- Click inside the quotes after
"PrimaryEntityId": "" - Click Dynamic content (lightning bolt icon)
- Search for Contact and select it (this is the contactid/GUID)
- Repeat for each field:
- Click inside the quotes after
| JSON Field | Dynamic Content to Select |
|---|---|
| PrimaryEntityId | Contact (the GUID) |
| firstname | First Name |
| lastname | Last Name |
| emailaddress1 | |
| telephone1 | Business Phone |
| statecode | Status |
After adding dynamic content, each value will show as a colored tag like First Name instead of empty quotes.
MessageName Options:
The MessageName field tells AuthScape what type of change occurred. Supported values:
| MessageName | Description |
|---|---|
Create or Created | A new record was created |
Update, Updated, Modify, or Modified | An existing record was changed |
Delete or Deleted | A record was deleted |
For the "Added or Modified" trigger, use "Update" - AuthScape handles both creates and updates the same way (it syncs the record data).
Step 5: Save and Test
- Click Save
- The flow should automatically turn on
- Go to Dynamics 365 and modify a contact to test
Option 2: Import Template
If you prefer to import a pre-configured template, use the generator below.
Step 1: Generate Your Template
Generate Power Automate Template
Your AuthScape domain without https:// (e.g., app.yourcompany.com)
How do I find my Connection ID?
The Connection ID is displayed in the CRM Connections table:
- Go to your AuthScape admin portal
- Navigate to User Management → CRM Integration
- Find the Connection ID column in the table
- Click the ID chip to copy it to your clipboard
You can also find it in the Edit dialog when clicking the edit button on a connection.
The generated webhook URL will be: https://your-domain/api/crm/webhook/dynamics/your-id
Step 2: Import into Power Automate
- Go to Power Automate
- Click My flows in the left sidebar
- Click Import > Import Package (Legacy)
- Click Upload and select the JSON file you downloaded
- Wait for the upload to complete
Step 3: Configure the Connection
- Under Related resources, find shared_commondataserviceforapps
- Click Select during import
- Choose your existing Dataverse connection, or click Create new
- Click Save
Step 4: Complete the Import
- Click Import
- Wait for the "Successfully imported" message
- Click Open flow to view your new flow
- Click Save and ensure the flow is turned On
Finding Your Connection ID
- Go to your AuthScape admin portal
- Navigate to User Management > CRM Integration
- Find the Connection ID column in the table
- Click the ID chip to copy it to your clipboard
You can also click the Edit button on any connection to see the Connection ID displayed prominently at the top of the dialog.
Testing the Flow
- Go to Dynamics 365
- Open any contact and make a change (e.g., update the phone number)
- Save the contact
- Go back to Power Automate
- Click Run history on your flow
- You should see a successful run
What Fields Are Synced
The template syncs these fields when they change:
| Field | Description |
|---|---|
| firstname | Contact's first name |
| lastname | Contact's last name |
| emailaddress1 | Primary email address |
| telephone1 | Primary phone number |
| statecode | Active/Inactive status |
Adding More Fields
To sync additional fields:
- Edit the flow in Power Automate
- Click on the trigger When a row is added, modified or deleted
- In Select columns, add more field names separated by commas
- Click on the HTTP action
- In the Body, add the new fields to the
valueobject using Dynamic content
Troubleshooting
Flow Not Triggering
- Ensure the flow is turned On
- Verify you're modifying one of the fields listed in "Select columns"
- Check that the Dataverse connection is valid
HTTP 404 Error
- Verify the webhook URL is correct
- Confirm the connection ID exists in AuthScape
HTTP 400 Error
- Check the JSON body format
- Ensure all dynamic content references are valid
Flow Runs But User Not Updated
- Verify field mappings are configured in AuthScape
- Check that the contact exists in AuthScape (or auto-create is enabled)
- Review sync logs in AuthScape CRM Integration
Run History
To view past flow runs:
- Open your flow in Power Automate
- Click Run history (or the clock icon)
- Click on any run to see details
- Expand actions to see inputs and outputs
Next Steps
- Configure field mappings in AuthScape
- Review Dynamics 365 setup