Identity and Access Management

Tips for Entra ID On-Premises Provisioning with ECMA2 Connectors

In my last post I detailed how to configure the Granfeldt PowerShell Management Agent as an ECMA2 connector with the Entra ID Provisioning Service. This post details a few tips for configuring and developing solutions that use ECMA2 connectors.

Microsoft Identity Manager Management Agent Configuration Methods Comparison

First though here is a table of configuration items and a comparison between the MIM Sync Service, MIM Portal & Service and Entra ID Provisioning with ECMA connectors. This will help you to know where you need to perform configuration tasks.
*Note*: this also tested my memory as I haven’t done much with MIM in ~5years.

Configuration ItemClassic Configuration (MIM Sync Service Only)MIM Portal & Service ConfigurationEntra ID Provisioning Service with ECMA Connector
Configuration InterfaceSynchronization Service Manager UIMIM Portal web interfaceProvisioning configuration of your Entra ID Application and the ECMA Configuration Tool on your Connector Agent Host
Management Agents CreationCreated manually through the Synchronization Service ManagerCreated through MIM Portal using Management Policy Rules (MPRs)Either in MIM and export to then Import via the ECMA Host Config Wizard, or create directly with the ECMA Host Config Wizard
Schema ManagementManual schema definition and mapping for connected systems (metaverse and connector space) in Sync ServiceSchema management for MIM Portal objects; connected systems schema still configured in Sync ServiceProvisioning configuration of your Entra ID Application (Mappings)
Run ProfilesManually configured in Sync Service Manager (import, export, delta, full sync, etc.)Still configured in Sync Service Manager, with additional workflow triggers through MIM ServiceOptions for Imports (Delta & Full) and Exports on the ECMA Connector configuration using the ECMA Host Config Wizard
Join/Projection RulesManually configured through join and projection rules UIConfigured through synchronization rules in the portalProvisioning configuration of your Entra ID Application (Mappings)
Attribute Flow ConfigurationManually configured through attribute flow UI; requires custom .NET extensions (C#, VB.NET) for complex transformationsDefined through synchronization rules with built-in transformation options including: Direct, Constant, Expression, Rule-based, Composite/Multiple attributes, Distinguished Name, and Boolean expressions. Includes options for flowing/not flowing NULL valuesProvisioning configuration of your Entra ID Application (Mappings)
Deprovisioning RulesManually configured through deprovisioning UIHandled through synchronization and workflow policiesOn the ECMA Connector configuration using the ECMA Host Config Wizard under Deprovisioning. Works in conjunction with the Entra ID Account status (Enabled/Disabled/Deleted)
Scoping FiltersManual configuration of connector/scoping filters in Sync ServicePolicy-based filtering defined in portal, underlying scoping filters still in Sync ServiceProvisioning configuration of your Entra ID Application (Scoping Filter)
Extension ConfigurationDirect coding in C# or other .NET languages for various extensionsExtensible through workflows and custom activitiesYour ECMA Connector logic
Password ManagementRequires PCNS (Password Change Notification Service) for password synchronizationRequires PCNS for password synchronization; adds enhanced password management with self-servicePassword Sync not available.
Provisioning initial password is supported
Administrative AccessAdministrative permissions controlled by Windows/Active Directory GroupsRole-based access control through the MIM Portal, still based on Windows/Active Directory Groups but with more granular permission optionsEntra ID Application Administrator Role
Approval WorkflowsNo native workflow capabilitiesApproval workflows including an Outlook client extension for approvals/denies without accessing the portalProvided via Lifecycle Workflows or Power Platform extensions (e.g Logic Apps)
Audit CapabilitiesBasic logging and reportingEnhanced auditing and reporting capabilitiesEntra ID Provisioning Logs. Windows Server Event Logs (for ECMA Host events)
Automation CapabilitiesPowerShell and WMI interfacesPowerShell, REST APIEntra ID Provisioning via Microsoft Graph.
ScalabilityLimited by single server architecture (only one active Sync Service server allowed)Can deploy multiple Portal/Service servers for improved front-end scalability, but still limited by single active Sync Service server dependencySimilar to MIM Sync Service with a single Active Connector Host (see High-Availability below)
Provisioning / Deprovisioning ConfigurationRequires writing Provisioning Extensions in .NET (C#, VB.NET)Handled through synchronization rules and workflow policiesProvisioning: Entra ID Application assignment (direct or via group membership)
Deprovisioning: Entra ID account status & ECMA Connector Deprov configuration
Deployment ComplexityRelatively simpler deployment once the Management Agent/Connector is built.More complex deployment with additional componentsSimilar to MIM Sync
Self-Service CapabilitiesNoneComprehensive self-service portal for users and groups management, plus Self-Service Password Reset (SSPR)None

Updating the Schema for your Connector/Connected System

  • If you change the schema configuration for your system or connector (schema.ps1 for the Granfeldt PSMA) edit the configuration of the ECMA Connector on the Connector Agent Host
    • Change a say the path to the schema.ps1 then change it back. This then enables the save button which will allow the system to trigger a refresh of the schema.ps1 script and your changes

Import Frequency

The ECMA Connector Configuration UI has a minimum time of 120 mins for import run cycles. During Development this is too slow for changes/testing/debugging. Change it from 120 to something like 10mins so you can see your changes more quickly in the Event Log (see next tip).
As the UI won’t let you change it to less than 120 mins edit the configuration.xml file as described below. Make sure you close the ECMA Config tool first. Next time you use the ECMA Config tool, the UI will generate a pop-up error. Just ignore it.
a. Change the time in the ECMA2Host Service Configuration
i. C:\Program Files\Microsoft ECMA2Host\Service\Configuration\configuration.xml
ii. Under <ECMAConfig>
<AutosyncTimer>10</AutosyncTimer>

To trigger a local import, you can also restart the ECMA2 Service on your connector host.

ECMA2 Logging

Logs for the ECMA2 Connector Host and your connector (e.g. PSMA) is on the connector agent host under Event Viewer = > Applications and Services Logs => ECMA2Host. In your connector if you have enabled verbose logging, you will see the objects and their values being imported in the Event Log. This is handy for ensuring you have your schema and import configurations correct.

Connectivity Errors from Entra ID Provisioning to ECMA

I’ve seen a few times when the ECMA Provisioning Host is also running Entra Cloud Sync and the certificate for the ECMA Connector somehow switched to a different certificate. That causes the Entra ID Application Provisioning to go into quarantine as connectivity was lost. Running the TestECMA2HostConnection script (under the ECMA2Host Troubleshooting directory) will validate if everything is configured and working correctly on the ECMA Agent Host and its configuration. The screenshot below is from an instance where the certificate was wrong. Generate a new certificate and save it (using the ECMA Config Wizard) and retest.

High availability

For on-premises apps using the ECMA connector: The recommendation is having one active agent and one passive agent (configured, but stopped, not assigned to the enterprise app in Microsoft Entra) per data center.

Unable to find Windows PowerShell 5.1 libraries

I’ve seen the following a few times and I think it was due to the actual Windows Server and other roles it was performing but adding it here in case anyone else experiences it.

Error: Unable to find Windows PowerShell 5.1 libraries under C:\Program Files\Microsoft ECMA2Host\Service\ECMA\Cache\<yourConnectorname> or C:\Program Files\Microsoft ECMA2Host\Service\ECMA

Find the following three DLLs under C:\Windows\WinSxS and copy them over to the directory mentioned in the error message.
You’re probably doing something daft like running the ECMA2Host on a Domain Controller.

  • System.Management.Automation.resources.dll
  • Microsoft.PowerShell.Security.resources.dll
  • Microsoft.WSMan.Management.resources.dll

Summary

Hopefully these tips help anyone else getting up to speed with implementing ECMA connectors with the Entra ID Provisioning Service.

Darren Robinson

Bespoke learnings from a Microsoft Identity and Access Management Architect using lots of Microsoft Identity Manager, Azure Active Directory, PowerShell, SailPoint IdentityNow and Lithnet products and services.

Recent Posts

EntraPulse – Your AI-Powered Gateway to Microsoft Graph & Docs

Today, I’m super excited to finally announce the Beta release of EntraPulse Lite – a…

2 months ago

Lokka MCP Authentication Enhancements

I'm excited to share some significant authentication enhancements I've contributed to the Lokka MCP Server…

3 months ago

AI Inception: Building AI Solutions with AI for AI

Last month I had the pleasure of speaking at the Sydney event for Global Azure.…

3 months ago

A Have I Been Pwned MCP Server for Claude

Model Context Protocol (MCP) is a powerful framework that extends AI clients like Claude and…

5 months ago

Azure AI Developer Hackathon

I've just completed participating in the Azure AI Developer Hackathon that was looking to provide…

5 months ago

Dynamics 365 CE (Sales, CRM) IAM PowerShell Module

Updated: July 2025 v1.0.2 Fixes issue setting D365SalesGlobals enabling session management for D365 Sales API…

6 months ago

This website uses cookies.