The migration took about ninety minutes: an XML file, an import, and a couple of CSVs to assign and unassign roles. No one built a role by hand, and it worked on the first real attempt. The framework that made it trustworthy took much longer and is now how we migrate security everywhere.
This was our first pilot of fully automated D365 F&SC security configuration and migration, and the third in our license optimization series. The first covered an integration-heavy environment where the standard playbook failed outright. The second covered a client whose security was excellent and still saved 38%.
A generated XML import rebuilt this client's security model in about ninety minutes, but trusting it took a testing framework and manager decisions. The monthly requirement is down from a projected $43,000 without remediation to roughly $26,000 so far.
Why this project mattered
An average client made a fine proving ground: a few inactive users, a few contradictory permissions, and telemetry showing roughly half of the configured permissions were never used.
Of roughly 150 users, almost all require a full license; most require two, some three. Monthly cost was around $34,000. A couple of roles were the exception: about $15,000 each on their own, each requiring four licenses. The costliest role, demanding the Supply Chain Management SKU, licensed 127 users. We aimed to see remediation through, which set this project apart.
The analysis: refreshingly ordinary
We found 40 inactive users, a high share. About half had a reason to stay; managers decided the rest, and about 20 users lost access.
Our check for discrepancies and contradictory access (a grant and a deny on the same object for one user) found one good sign: no privilege carried a multiple-license requirement. As our other case studies show, mixed-license privileges snowball up through duties and roles until users pay for SKUs they never needed. This environment had none of that.
Ninety minutes to a new security model
We tested generating an importable XML security configuration from our optimal design and importing it into Finance and Supply Chain, plus CSVs to assign new roles and unassign old ones.
The model migrated in ninety minutes with no hand-assignment of hundreds of users, validating the pilot's core idea. Migration was easy; the framework was the project.
What full automation requires
Beyond the roles sit the relationships they accumulate over years in production.
Roles can be granted within a specific part of the organization, attached to case categories, and referenced by views and personalizations. Rebuilt roles inherit none of this automatically.
For roles with security policies (XDS), where a policy seemed to shape what users could see, we assigned Microsoft's diagnostic roles XDSDataAccessPolicyBypassRole and XDSPolicyByPassRoleScenarioTestRole, which show at once whether behavior comes from the security configuration or a policy on top of it. We used them often as identifiers.
Full automation needs a framework supporting the new configuration end to end, not just the happy path. Ours now migrates security with data migration entities and XML files instead of manual role creation.
The task recorder discovery
Our top lesson is organizational: client managers' support is the key to remediation. Our testing framework rests on one discovery: users should report missing security as a task recording.
Users record the task they expected to do. Microsoft's security governance parser (System administration → Security → Security governance → Security process role maintenance) lists the menu items they expected to reach; we add the supporting privileges and roles to the new roles. Unlike the older task recorder analysis (display menu items only), it covers display, action, and output menu items from controls, so buttons and reports, long the blind spots of security analysis, are now visible.
In this highly customized environment, screenshots made each gap slow to locate, so reporting missing access as a task recording with the user ID attached became a formal requirement.
The obstacles nobody plans for
Production drift is the surprise most likely to be mistaken for a failed model: the design is a snapshot, production keeps moving, and every resulting ticket needs investigating.
| Obstacle | What actually happens | How we handle it now |
|---|---|---|
| Surprise data refresh | A test refresh from production wipes out the entire new configuration. | Refresh schedules are agreed and locked before deployment. |
| 5 MB import ceiling | Microsoft's security import tool rejects anything larger than 5 MB. | The pipeline automatically splits the XML into fragments of 5 MB or less. |
| Prod / test mismatch | Code, configuration, workflows, master data, or parameters differ; correct security looks broken. | Every reported gap is triaged; a large share are not security issues at all. |
| Production drift | Production users gain new roles the frozen test design never saw. | Expected and tracked: a ticket category, not a model defect. |
Widen the test group, fast
In hindsight, we'd move from small-group testing to broad user acceptance testing much earlier. A handful of experts or users produces a slow drip of gaps and churn; a large group gives more reliable results, and each fix reaches every qualifying user. Small-group testing is a gate, not a phase.
Telemetry's blind spot, and the manager's lever
A major cost lever came from what telemetry can't tell you.
A user may hold a very expensive, technically correct role yet only browse and read; to telemetry they look like a power user, since both touched the menu item. In several cases, managers judged a group fine with read-only access despite telemetry activity on those menu items, and cutting those permissions brought significant license savings. Only a human who knows the team can spot telemetry's false signals.
Finale: minimums and reclassification
Ready to buy, we hit Microsoft's purchase minimums, and found one last saving.
Base licenses (Supply Chain Management, Finance, Commerce, Project Operations) have a minimum of 20, Human Resources 5, and Premium licenses such as Supply Chain Management Premium or Finance Premium 10. You can't buy below the floor, but it is also an opportunity: moving attached licenses to full and full to attached where the math favored it, and reclassifying existing subscriptions (unused attached Human Resources licenses became the attached Supply Chain Management licenses the client needed), saved a couple of thousand dollars a month without changing anyone's access.
The result
Without remediation, this client was heading toward about $43,000 a month. The 90-minute pipeline took them to roughly $32,000 immediately, a saving of around $11,000 monthly, or 25%. The whole remediation (configuration generation, import, role assignment, and unassignment) ran as an automated pipeline, leaving manual effort for human decisions.
Remediation is still open but nearly closed out, with manager reviews, task-recording checks, and reclassification passes continuing. At the latest measurement, the requirement is roughly $26,000 a month, a saving of about $17,000, or close to 40%, projecting to around $200,000 a year. This is an interim figure; we'll update it once remediation closes.
| Lesson | Why it matters |
|---|---|
| Manager sponsorship is the key | With it, decisions get made. Without it, every access gap becomes a negotiation. |
| Task recordings, not screenshots | A screenshot starts an investigation. A recording with a user ID ends one. |
| Widen the test group fast | Small groups drip churn. Large groups give reliable results, applied to everyone who qualifies. |
| Automate the relationships, not just the roles | Organizations, case categories, views, personalizations, and XDS policies all ride on the old roles. |
| Check the license minimums before you buy | The floors are real, and rearranging the subscription against them is free money. |
The 90-minute migration needs the framework around it: automatic XML and CSV generation, a locked refresh schedule, a 5 MB-aware split step, and task-recording-based testing. Build it once on an unremarkable project like this, and it pays off on the next migration too. Automate the happy path without it, and production drift and the 5 MB import ceiling will eat the time you thought you saved.
The fourth engagement in this series, a greenfield security design, caught the same class of problem before production: a thousand segregation-of-duties conflicts surfaced a day before UAT, not years into a live environment.
Savings like these come from our paid analysis of how people actually use their access, not from our free workbook, which only recalculates licenses for the security you have today.