Building Lumen Photonics: A Test Company and Its Data

Data modeling · Entra ID provisioning · Power Automate migration · Lumen Photonics lab

Approach highlighted

Modeling realistic master data first, then loading it with repeatable, scripted processes (bulk import, Graph PowerShell and a solution-aware Power Automate migration) instead of entering it by hand.

Project Summary
To test SharePoint permissions and segregation of duties properly, the lab needed real roles: requesters, approvers, an implementer who isn't the deployer, and an auditor who can read everything and change nothing. Lumen Photonics is a fictional fiber laser manufacturer with a headquarters and two plants, built in a Microsoft 365 test tenant with 24 employees, nine departments and the reference data an ERP would expect.

Master Data Before Transactions
The reference tables were designed first, because every transaction (change requests, downtime, production orders) points back at them. Each one maps to its equivalent in Dynamics 365 Finance & Operations.

TableRowsHoldsF&O equivalent
Sites3Headquarters, Plant 1 (chip fab), Plant 2 (fiber laser assembly)Sites
Departments9Finance, Production, Quality, Business Systems, Internal Audit and moreOperating units
Cost Centers10Production split by plant, so one department is costed separately per siteFinancial dimension
Shifts3Office day shift and two production shiftsCalendars / working times
Employees24Title, department, site, cost center, manager, shift and change request roleWorkers

The Organization
Roles were chosen so that every control could be tested by a real person. Business Systems is split into an analyst who configures changes, a manager who deploys them and a developer, so the "implementer is never the deployer" rule can be shown. The internal auditor reports outside the operations and finance chains.

NameTitleDepartmentSiteManagerChange request role
Victor HaleVP OperationsExecutiveHQ—Escalation approver (Operations)
Sandra WhitfieldChief Financial OfficerFinanceHQ—Escalation approver (Finance)
Grace LinControllerFinanceHQSandra WhitfieldFinancial approver
Priya NairCost AccountantFinanceHQGrace LinRequester
Marcus WebbAccounts Payable SpecialistFinanceHQGrace LinRequester
Ray HoltBusiness Systems ManagerBusiness SystemsHQSandra WhitfieldDeployer (moves changes to production)
Maya ChenBusiness Systems AnalystBusiness SystemsHQRay HoltImplementer (configures in sandbox)
Owen PatelD365 F&O DeveloperBusiness SystemsHQRay HoltDeveloper
Ellen ParkInternal AuditorInternal AuditHQ—Auditor (read-only)
Carla MendesPlant 1 Production ManagerProductionPLT1Victor HaleProcess-owner approver (Plant 1)
Jake MorrisonShift SupervisorProductionPLT1Carla MendesRequester
Aisha BelloProduction OperatorProductionPLT1Jake MorrisonNone
Dana ReyesPlant 2 Production ManagerProductionPLT2Victor HaleProcess-owner approver (Plant 2)
Luis OrtegaShift SupervisorProductionPLT2Dana ReyesRequester
Hannah ColeShift SupervisorProductionPLT2Dana ReyesRequester
Ben TranProduction OperatorProductionPLT2Luis OrtegaNone
Sofia RamirezProduction OperatorProductionPLT2Hannah ColeNone
Greg NovakMaintenance SupervisorMaintenancePLT2Victor HaleRequester
Tyler BrooksMaintenance TechnicianMaintenancePLT2Greg NovakNone
Tom BeckerQuality ManagerQualityPLT2Victor HaleRequester / consulted
Nina KowalskiQuality EngineerQualityPLT2Tom BeckerNone
Ian FletcherSupply Chain ManagerSupply ChainHQVictor HaleProcess-owner approver (Supply Chain)
Rachel KimProduction PlannerSupply ChainHQIan FletcherRequester
Derek ShawManufacturing EngineerManufacturing EngineeringPLT2Victor HaleConsulted (routes)

Identity: Bulk Import, Then Scripted Managers
Users were created with the Microsoft 365 admin center's bulk import, after regenerating the CSV to match Microsoft's template headers exactly, the most common reason a bulk import fails. Managers aren't supported by bulk import, so they were set with Microsoft Graph PowerShell from the same reference file, then verified with a second query rather than assuming the script worked.

$rows = Import-Csv ".\employees_reference.csv"

foreach ($row in $rows) {
    if ([string]::IsNullOrWhiteSpace($row.Manager)) { continue }

    $manager = Get-MgUser -UserId "$($row.Manager)@$domain"
    Set-MgUserManagerByRef -UserId "$($row.Username)@$domain" -BodyParameter @{
        "@odata.id" = "https://graph.microsoft.com/v1.0/users/$($manager.Id)"
    }
}

The script ran with the execution policy relaxed for that PowerShell window only, the smallest change that does the job, and was read before it was run. Managers matter later: approval escalation looks up an approver's manager.

Groups With Names That Say What They Do
Access-granting security groups use an SG- prefix and assigned membership: SG-CR-Approvers, SG-Internal-Audit and SG-All-Employees. The last one exists because the tenant hides the "Everyone except external users" claim, and an existing "All Company" group turned out to contain only the administrator. Checking membership before granting access caught it.

Lookups to Reference Data
The Departments list was created first, because a lookup column can only point at a list that already exists. The department head is a Person column, so a flow can find a department's head without hard-coding names.

Departments list with department heads as people
Reference data imported from CSV, with department heads resolved to real users.
Department lookup column pointing at the Departments list
The Change Requests Department column looks up to this list, so renaming a department updates every request.

Migrating the Legacy Tracker
The 20 legacy change requests were treated as a migration from the old Excel tracker, not as test data typed in by hand. A manually triggered cloud flow, built inside a solution so it can move between environments, reads an Excel table and creates one list item per row. It looks up each department's ID, sends null instead of empty strings for optional fields, and applies the same fail-safe SOX default as the list.

// Department lookup: find the Departments item ID for this row
first(outputs('Get_items')?['body/value'])?['ID']

// Optional fields: send null instead of an empty string
if(empty(items('Apply_to_each')?['TargetReleaseDate']), null,
   items('Apply_to_each')?['TargetReleaseDate'])

// Fail-safe default: anything not explicitly 'No' loads as SOX relevant
if(equals(items('Apply_to_each')?['SOXRelevant'], 'No'), false, true)
Lumen Change Management solution containing the migration flow
The flow and its connection reference live in a solution, ready for the approval flow to join them.
Successful run of the migration flow with 20 iterations
Tested on two rows first, then run for all 20, then turned off but kept as evidence of how the data got there.

A Migration Limitation, Documented
Every migrated item shows the migration account as Created By, because SharePoint sets that field itself. The original requester and submission date were kept in dedicated Requester and Submitted On columns. The trade-off is recorded rather than hidden: because "see only your own" is based on Created By, original requesters can't see their migrated requests, while approvers and auditors can.

Download the Seed Data
Employees · Departments · Cost centers · Sites · Shifts · Change requests · Line status

Skills Demonstrated
Master data modeling, ERP-aligned reference data, Microsoft 365 bulk user import, Microsoft Graph PowerShell, Entra ID security groups and naming conventions, SharePoint lookup columns, Power Automate data migration, solution-aware flows, expression-based data cleansing, and documenting migration limitations.

More from the Lumen Photonics lab

Lab at a Glance Change Request Controls Lumen Hub Intranet Change Request Enforcement Document Control Approval Routing Change Control Dashboard Systems Assistant Agent

Back to Projects