dmlab / module-admin-scim-azure
Microsoft Entra ID provider plugin for the admin-scim SCIM 2.0 server — canonicalizes Entra's core-URN-qualified attributes and group-member removes, and documents the Entra enterprise-app provisioning setup. Installing it pulls dmlab/module-admin-scim.
Package info
github.com/dmlab-work/module-admin-scim-azure
Type:magento2-module
pkg:composer/dmlab/module-admin-scim-azure
Requires
- php: ~8.2.0||~8.3.0||~8.4.0||~8.5.0
- dmlab/module-admin-scim: ^0.2.0
- magento/framework: ^103.0.7
- magento/module-backend: ^102.0.7
- magento/module-config: ^101.2.7
Requires (Dev)
- phpunit/phpunit: ^11.5||^12.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Microsoft Entra ID SCIM provisioning for Magento 2 admin users.
Automatic admin offboarding for Microsoft Entra ID. When IT removes a user in Entra, the Magento admin account is deactivated on Entra's next provisioning cycle, and new hires get the right role before they log in. Access-control evidence for SOC 2 / ISO 27001.
Install
composer require dmlab/module-admin-scim-azure bin/magento module:enable DmLab_AdminScim DmLab_AdminScimAzure bin/magento setup:upgrade
The require pulls dmlab/module-admin-scim — the whole provisioning chain installs at once.
Set up the Entra SCIM app
-
In Magento, open Stores → Configuration → DMLab → Admin SCIM, enable Admin SCIM, and set a Bearer Token. Set Admin SCIM → Provider = azure — required when several provider plugins are installed.
-
Read the Tenant URL from Stores → Configuration → DMLab → Admin SCIM → Microsoft Entra ID Setup. It is this store's SCIM base URL, e.g.
https://your-host/admin-scim/v2. -
In Entra, create an enterprise application, then under Provisioning → Admin Credentials enter:
Setting Value Tenant URL the URL from step 2 Secret Token the Bearer Token from step 1 -
Set the provisioning Mapping and Scope, then enable provisioning and assign users/groups.
Requirements
Magento 2.4.7+ · PHP 8.2–8.5 · dmlab/module-admin-scim ^0.2.0 (installed automatically) · store reachable by Entra over HTTPS
Pairs with dmlab/module-admin-sso-azure — Entra login to the admin panel; this module creates, updates and deactivates the accounts in the background.
Supported provisioning actions
Only SCIM-managed admins (created via SCIM) are touched.
- Create — Entra pushes a new user → admin_user created.
- Update —
userName,externalId,name(givenName,familyName,formatted),emailsandactivechange the admin. Other attributes (displayName,title,preferredLanguage, phone numbers, addresses, enterprise and other extension attributes) are accepted and ignored. - Deactivate / reactivate —
active: "False"/"True", alone or batched with other changes. Unassigning the user or a soft delete in Entra deactivates. - Delete — a hard delete in Entra sends
DELETE /Users/{id}, which hard-deletes the SCIM-managed admin. - Group push — group membership → role mapping; a member remove drops only the listed members.
Architecture
Entra pushes SCIM 2.0 requests to the admin-scim endpoint. This plugin registers AzureRequestNormalizer into admin-scim's RequestNormalizerInterface seam under the provider code azure; the core invokes it only when the configured provider is azure (or it is the only registered normalizer and none is selected). Provisioning and role mapping happen in admin-scim.
Rewritten by AzureRequestNormalizer into the canonical RFC form:
- Core-URN-qualified attributes —
urn:ietf:params:scim:schemas:core:2.0:User:attr(or.attr) in a PATCHpath, a path-lessvaluekey or a POST/PUT key becomes the bareattr. - Group-member remove by value — Entra puts the members in the op's
valueinstead of apathfilter (RFC §3.5.2.2). Rewritten to onemembers[value eq "<id>"]remove per member; an emptyvaluelist removes nobody (the core would clear the group).
Accepted natively by the core, passed through unchanged:
- extension attributes (e.g. the enterprise User URN), flat or nested — ignored;
emails[type eq "work"].value— sets the email;- stringified booleans (
"False","True"); Add/Replaceused interchangeably, capitalized op names;- PATCH answered with
200and the updated resource, which Entra accepts.
License
OSL-3.0 © DMLab. Commercial licensing and support: https://dmlab.work.
