n8n

How to Sync Microsoft Graph to Zammad User Management?

Keep your helpdesk user list synced with your company address book. The flow reads contacts from Microsoft Graph and updates user records in Zammad. It suits IT teams that want clean profiles without manual edits.

A manual run starts the process. The system calls Microsoft Graph to get contacts, splits the list, and lets you filter which contacts to keep. A Set step builds a standard user object with email, first name, last name, phone, mobile, and an entra key from the contact id. At the same time it pulls all users from Zammad. A Merge step matches by email and updates matched users. A compare block finds new contacts and creates them in Zammad. Another compare block finds removed contacts by entra key and deactivates them. This keeps records in sync and marks inactive users instead of deleting them.

You will need a Microsoft account with permission to read contacts and a Zammad token that can manage users. After setup, each run finishes in minutes and replaces manual spreadsheets. This is useful for onboarding, offboarding, tenant changes, and keeping a partner directory synced to your helpdesk.

What are the key features?

  • Manual start for safe testing before going live
  • Microsoft Graph contact fetch through OAuth2 in the HTTP Request node
  • Split contacts into single items for clean processing
  • Optional filters to include only the contacts you want
  • Set step builds a universal user object with email, names, phone, mobile, and entra_key
  • Pull all Zammad users to compare against the source
  • Merge by email to route matched records to updates
  • Compare datasets to find new contacts and removed contacts
  • Create, Update, and Deactivate Zammad users with custom fields preserved

What are the benefits?

  • Reduce manual user updates from hours to minutes per sync
  • Improve contact accuracy by up to 90 percent by using one source of truth
  • Automatically deactivate departed contacts and cut ticket noise by up to 80 percent
  • Connect Microsoft Graph and Zammad in one flow
  • Scale to thousands of contacts with a single run

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Microsoft Graph and Zammad. See the Tools Required section above for links to create accounts with these services.
  3. Open the Get Contacts from Entra node. In the Credential to connect with field, click Create new credential. Choose Microsoft OAuth2. Follow the on screen steps to connect your Microsoft account. Make sure the app has Contacts.Read or Contacts.Read.All permission and grant admin consent if asked.
  4. Test the Microsoft connection: click Execute Node on Get Contacts from Entra. Confirm you see a value array of contacts.
  5. Set up Zammad credentials: double click Get Zammad Users. In the credential dropdown, click Create new credential and choose Zammad Token Auth. Enter your Zammad base URL and personal access token. The token must have permission to read and write users.
  6. Test Zammad access: execute Get Zammad Users and confirm a list of users is returned.
  7. Check mappings in the Zammad Universal User Object node. Confirm email, firstname, lastname, phone, mobile, and entra_key map to the right contact fields. Adjust if your directory uses different fields.
  8. Review filters: open both If nodes and add conditions such as email domain or department if you want to limit which contacts sync.
  9. Verify comparison logic: in Merge confirm the match field is email. In Find new Zammad Users confirm it compares email to email. In Find removed Users confirm it compares entra_key to entra_key and resolve is set to prefer input 1.
  10. Run a full test: click Execute Workflow. Check Zammad for updated users, newly created users, and deactivated users. Confirm custom fields show the entra_key.
  11. Troubleshoot common issues: if no contacts appear, check Microsoft permissions and that contacts have email values. If updates fail, confirm the Update Zammad User id field uses the Zammad user id. If duplicates appear, ensure emails are unique in the source.
  12. Optional scheduling: add a Cron node to run hourly or daily and connect it to the start. Keep the manual trigger for testing.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Microsoft Graph

Sign up

Exchange Online (Plan 1): $4.00 user / mo (annual)

Zammad

Sign up

Self-hosted (open-source): Free (AGPLv3), API included

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.