The problem nobody budgets for

Every Epicor team knows the routine. A new hire starts, and someone has to create the Epicor user, grant the right companies, attach the right security groups, link the user to an employee record, and set up inspector or buyer details where the job needs them. In a multi-company installation that is the same set of clicks repeated in every company, across several screens, from memory.

The cost is not the minutes. It is the drift: a role granted in one company and forgotten in another, a user linked to the wrong employee, and an audit question nobody can answer quickly: who can actually open this menu?

  • 1 dialogfor companies, roles and the employee link
  • 1 Updatecarries all three changes to Epicor
  • 5 reportsaccess, menu tree, explorer, buyers, cache
  • 0 secretsin source control or logs

What the application does

  • Users: create Epicor users and maintain their details from one screen.
  • Company and role access: grant or remove companies and security groups for a user across every company in one save.
  • Employee link: propose and set the employee record per company, with the admin able to override each one.
  • Inspectors and buyers: set up inspector records and review buyer setup per company.
  • Access reporting: answer which companies, roles and menus each user can reach, exported to CSV for audits.

The architecture

The design rule is simple: read often and cheaply, write rarely and carefully. Reads come from Epicor Business Activity Queries and are served from a shared in-memory cache. Writes go straight to the Epicor REST services, one user at a time, and every write is checked.

Provisioning app architecture An administrator's browser talks to an ASP.NET Core Razor Pages application. The application reads Epicor data through BAQs via a shared cache that loads each dataset once and keeps the last good copy, writes through an Epicor client layer that sends one update and verifies it by reading back, and stores only its own admin logins and settings in its own database. Reads go to the Epicor BAQ service; writes go to UserFileSvc over OData v2 and to employee and inspector services over REST v1. Admin browserHTTPS only Provisioning app, ASP.NET Core Razor Pages UIAdmin login, env banner EpicorDataCacheSingle flight, last good copy EpicorClient write layerOne Update, then read back App databaseAdmin logins and settings only Epicor Kinetic BAQ service: readsUserFileSvc: OData v2Employee, Inspector: REST v1API key + service accountPilot first, then Production readwrite
Reads are cached and shared; writes are explicit and verified. The only tables the app owns are its own admin logins and settings. Built on ASP.NET Core Razor Pages (.NET 10) with Serilog logging.

A cache that fails gracefully

BAQ calls are the slowest part of the app, and several pages need the same data. A shared cache loads each dataset once, even when several requests ask for it at the same moment (single flight). If Epicor is briefly unavailable, the app keeps serving the last good copy instead of an error page. A cache browser shows what is held and how old it is, and lets an admin refresh it on demand.

Security: an app that can create users is a privileged system

Any tool that creates Epicor users and grants company access holds the keys to the ERP. It deserves the same care as the Epicor security manager role itself. This is how the build handles it, and what we recommend for production.

RiskIn this buildRecommended for production
Leaked Epicor credentialsCredentials live in .NET user secrets or environment variables, are blank in configuration files and are never written to logsMove them to a vault such as Azure Key Vault; rotate them whenever an administrator leaves
Over-privileged API accessOne dedicated Epicor service account, used only by this appRestrict the REST API key with an Epicor access scope limited to the services the app calls
Unauthorized use of the appThe app has its own admin logins, stored in its own SQL databaseKeep the admin list short, require HTTPS, and host the app on the internal network or behind VPN or single sign-on, never on the open internet
Changes no one can traceStructured Serilog logging of each write and its verification resultRetain logs centrally and review them in the regular access audit
Testing in the wrong environmentA clear Pilot or Production banner on every pageProve every request shape in Pilot after each Epicor upgrade before using Production

The access workflow

This is the part that took the most care. Granting company access in Epicor is not one call. It is a short conversation with the UserFileSvc business object, and each step has to leave the dataset in a shape the next step accepts.

Company access workflow The admin picks companies, roles and an employee per company. The app reads the user with GetByID, calls AddUserCompany for each new company, merges company list, group list and employee IDs with RowMod A for new rows and U for existing rows, sends one Update with the full dataset, reads the user again, compares the stored state with the request, and reports either saved and verified or the exact difference. AdminProvisioning appEpicor UserFileSvcPick companies, roles, employee per companyGetByID (userID)UserFile and UserComp rowsAddUserCompany for each new companyUpdated dataset rowsloopMerge CompList, GroupList, EmpID per companyRowMod A for new rows, U for existingUpdate (full dataset)GetByID againStored stateCompare stored state with the requestSaved and verified, or the exact difference
Companies, roles and the employee link travel in the same Update. A final read-back decides whether the save counts.

Verify, do not assume

The most useful rule in the build: a successful HTTP response is not a successful change. Epicor can accept a request and still not persist a row. After every save the app reads the user back and compares the company list, the security group list and the company rows with what was requested. If anything is missing, the admin sees exactly what, not a green message.

New rows need a different flag. A company row with no stored identifier yet must be sent as an add (RowMod = "A"), not an update ("U"). Sending an update for a row that does not exist produces the “record not found by its SysRowID” error. One rule in the merge step removed a whole class of failures.

Matching users to employees automatically

Each company holds its own employee records. When companies are selected, the app proposes a default employee for each one, trying these rules in order and stopping at the first match:

  1. The employee ID or login ID equals the user ID.
  2. First and last name match.
  3. The same employee ID already exists in another company.
  4. The email address matches.
  5. No match: the field stays empty and the admin chooses. Nothing is linked silently.

Answering “who can open this menu?”

Epicor menu security is decided by several conditions at once, and menus and security groups are defined per company. The app rebuilds that evaluation from BAQ data, one index per company. A user can open a menu item only when every check below passes:

  1. The menu item is enabled.
  2. It is not restricted to security managers only.
  3. Neither the user nor any of their groups is on the item's deny list.
  4. The item's entry list is empty, or it contains the user or one of their groups.
  5. Every parent menu above it passes the same checks.

The menu and role explorer lists one row per menu and role pair. Choose a role and you see every user who holds it. Audit questions that used to take an afternoon become a search box.

What the reports cover

ReportQuestion it answers
User accessWhich companies and roles does this person have?
Menu access treeWhat can this user open, shown as the real menu hierarchy?
Menu and role explorerWhich roles reach this menu, and who holds them?
BuyersWho is set up as a buyer, in each company?
Cache browserWhat data is the app holding, and how fresh is it?

Every report exports to CSV, and the filters suggest menus, roles and users as you type, so admins do not need to remember exact codes.

Lessons from the build

  • Treat the error text as the specification. Epicor’s messages named the exact parameter they expected; reading them closely shaped the final request bodies more than the documentation did.
  • Verify after every write. A read-back turns a silent partial failure into a clear message.
  • Parse the data you really have. Entry lists were comma separated while user group lists used a different separator. One wrong assumption made a report look empty.
  • Assume duplicates. Security groups repeat once per company; remove duplicates before building any dictionary.
  • Keep secrets out of the repository. Credentials belong in user secrets, environment variables or a vault, never in configuration files or logs.
  • Make the environment obvious. A Pilot or Production banner prevents the most expensive kind of mistake.
Where it stands. The workflow was developed against a live Epicor environment and refined from real responses. We are deliberately not quoting time-saved figures because we have not measured them. If you adopt this approach, test the request shapes against your own Epicor version in Pilot before relying on them.

The takeaway

Good internal tools are rarely about new technology. They remove a repeated, risky task, show the truth about the system, and say plainly when something did not work. A shared cache, a careful write path and a read-back check were enough to turn user onboarding from a ritual into a single, reviewable action. The same pattern, cached BAQ reads and verified writes through Epicor business objects, carries over to other administrative work in Kinetic.