What This Automation Does
This workflow gets contacts from Microsoft Entra and syncs them with Zammad users automatically.
It finds new contacts to add, updates existing user info, and deactivates users no longer in Entra.
It stops manual errors and saves hours of work.
Who Should Use This Workflow
This is for support IT managers or teams who handle user data in both Microsoft Entra and Zammad.
It suits anyone wanting to automate contact syncing without manual copying.
Tools and Services Used
- Microsoft Graph API: Gets contact data from Microsoft Entra.
- Zammad API: Manages user records in Zammad with token authentication.
- n8n Automation Platform: Runs the workflow nodes and logic.
- Microsoft OAuth2 Credentials: Securely access Microsoft Graph API.
Inputs, Processing, and Outputs
Inputs
- Contact list JSON array from Microsoft Graph API.
- User list JSON from Zammad API.
Processing Steps
- Split Entra contacts for individual processing.
- Filter out invalid or unwanted contacts.
- Map Entra contacts to a user format that matches Zammad.
- Filter active and “contact” Zammad users.
- Merge data from both sources by email.
- Compare datasets to find new and removed users.
- Update existing Zammad users with new info.
- Create new users for missing contacts.
- Deactivate users no longer in Entra.
Outputs
- Updated Zammad user records.
- New Zammad users created.
- Inactive Zammad users deactivated but data preserved.
Beginner Step-by-Step: How to Use This Workflow in n8n
Step 1: Download and Import
- Download the ready workflow file using the Download button on this page.
- Open the n8n editor where you run workflows.
- Choose “Import from File” and select the downloaded workflow.
Step 2: Configure Credentials and Settings
- Add or update Microsoft OAuth2 credentials with correct app permissions for Graph API access.
- Set Zammad API Key token in the credential settings for user management.
- If needed, update email, folder, or ID fields inside nodes to match your account.
Step 3: Test the Workflow
- Run the workflow manually using the Manual Trigger node.
- Check the output data and logs to confirm contacts are fetched and users synced.
Step 4: Activate for Production Use
- Activate the workflow toggle in n8n to enable automation.
- Optionally replace the manual trigger with a scheduled Cron node for regular syncing.
Optionally, consider self-hosting n8n for better control and security.
Customizations
- Add more user fields from Entra, like job title or department, in the mapping node.
- Adjust filters to exclude contacts by company or email domain.
- Change deactivation to archiving in Zammad if preferred.
- Set a schedule to run workflow regularly instead of manual trigger.
Troubleshooting
- If authentication errors occur on Zammad nodes, check the API Key validity.
- 401 errors from Microsoft Graph mean OAuth permissions need fixing.
- No user updates? Confirm merge keys and email matching fields.
Pre-Production Checklist
- Test Microsoft OAuth with the HTTP Request node alone.
- Confirm Zammad API token can read and write users.
- Run workflow manually and check outputs.
- Make a backup of current Zammad user data before starting.
- Review logs for any data merge or API errors.
Deployment Guide
Save the workflow after verification.
Activate it or switch the trigger to cron for scheduled runs.
Watch logs regularly to catch any sync problems early.
Conclusion
This workflow automates syncing Microsoft Entra contacts with Zammad users.
You get less manual work, fewer mistakes, and better contact data for support.
Users get up-to-date info without delays.
Consider adding workflow steps to assign tickets or use HR data for more automation.

