One-time setup to let a tenant push their Customers, Jobs, Invoices, Bills, and Credit Memos — with real Material/Labor/Sub/Equipment cost-type detail, not a blended number — from ClientManager into their own QuickBooks Online company. No more re-typing the same record twice.
Sign in at developer.intuit.com with the Intuit account that should own this, click My Apps → Create an app, pick "QuickBooks Online and Payments" as the platform, and give it a name (e.g. "ClientManager - Dev").
Inside the app, go to Keys and credentials in the left nav. Under the Development tab, toggle "Show credentials" — you'll see Client ID and Client secret, each a long jumbled string (30-50+ characters).
Still in the app, go to Settings → Redirect URIs (a separate tab from Keys and credentials — easy to miss). Under Development, click Add URI and enter:
http://localhost:5229/api/quickbooks/oauth-callback (for local dev)
https:///api/quickbooks/oauth-callback (for the cmblazor test site)
https://clientmanager.com/api/quickbooks/oauth-callback (for real production, once wired to Production keys)
Click Save. Leave Intuit's own default OAuth Playground URL in the list too — don't delete it, it's harmless and useful for manually testing a connection later.
These two values are app-level config, not per-tenant — set once per CM environment (see the table further down). On a dev machine, from the ClientManager.Web project folder:
dotnet user-secrets set "QuickBooks:ClientId" "<the real Client ID>"
dotnet user-secrets set "QuickBooks:ClientSecret" "<the real Client Secret>"
On a deployed IONOS site, the same two keys go into that site's own appsettings.Production.json under a "QuickBooks" section — same pattern already used for Stripe/Resend/Twilio.
As that tenant's Site admin, go to Financial → QuickBooks Actions, click Connect QuickBooks (in the panel at the top of the page — not inside either tab). You're redirected to Intuit's own login/consent screen — sign in as the QuickBooks company owner and click Connect. You're redirected back to CM showing Connected with the company name and realm ID.
One nav entry, Financial → QuickBooks Actions, opens one page with three distinct areas. Knowing which area you need saves a lot of hunting:
| Area | What lives there |
|---|---|
| Top panel (above the tabs) | Connect / Disconnect — the one-time OAuth handshake. Nothing else. |
| Mapping tab | Every crosswalk/config decision: Job Status, Class, Department, Payment Term, the Cost-Type Split (Material/Labor/Sub/Equipment by Category), and the flat Cost Item → QuickBooks Item list. Nothing here ever pushes anything to QuickBooks by itself — it's all configuration a later Sync reads. |
| Sync tab | Where real CM records actually get queued and pushed: Customers, Jobs, Invoices, Payments, Vendors, Bills, Credit Memos, Vendor Credits, Employees, Time Activities, Estimates. Checkbox + Synchronize button per section. |
QuickBooks tracks a fixed 6-value Job Status (None/Pending/Awarded/In Progress/Closed/Not Awarded). CM auto-matches any Project Status whose name reads the same (ignoring spaces) — the default statuses seeded with CM already match, so this table mostly needs zero manual setup. Only map a row by hand if a tenant's own custom status name should push as a specific QBO value (e.g. a custom "Under Warranty" status mapped to "Closed").
These are genuinely optional QuickBooks features, off by default for every company. A tenant has to explicitly turn on Class and Location (QBO's name for Department) tracking in their own QBO Account & Settings → Advanced → Categories, and manually create their own entries there, before this table has anything to map at all.
When an Invoice line comes from an Estimate that has a real Material/Labor/Sub/Equipment cost breakdown, CM pushes it to QuickBooks as separate lines instead of one blended number — competitors' "casual" QB sync doesn't do this. Map each Cost Category (not each Cost Item — there are far fewer Categories, this is deliberately the coarser, faster-to-set-up grain) to up to 4 QuickBooks Items, one per cost type. A category with only some types actually used on real Invoices only needs those types mapped.
QuickBooks rejects a free-text invoice line — every line needs a real QBO Item. For each Cost Item your manually-entered Invoice/Bill/Credit-Memo lines actually use, pick the closest match from the dropdown and click Save. You don't need to map every Cost Item up front — just the ones you're about to sync.
Neither type has line-item entry in CM — both are single blended-amount documents, so there's no per-line mapping table for them. Instead: a Credit Memo gets a single "Cost Item" field right on its own edit form, resolved through the same flat Cost Item mapping above. A Vendor Credit resolves automatically through whichever Bill line it's linked to — nothing extra to map if it's already linked; if it isn't linked to a specific Bill line, it can't sync yet.
QuickBooks requires a Customer (and its Job/sub-customer) to exist before any transaction can attach to it. Check the Company under Customers, click Synchronize Selected Customers, then do the same for the matching Project under Jobs. Both should show Posted when done.
Find the record under its own section, check it, click that section's Synchronize button. A green Posted result means it's really in QuickBooks — confirm by logging into that QuickBooks company directly (sort by Date, newest first, or search the customer/vendor name — QBO's own document number won't match CM's internal ID).
CM pushes data into QuickBooks — never the other way. If a tenant edits an Invoice directly inside QuickBooks, CM never sees it; CM's own version stays the source of truth. And nothing pushes in the background — every sync is a deliberate click on the Sync tab, never silent or scheduled.
| What | Scope | Where it's stored |
|---|---|---|
| Client ID / Client Secret | One per CM environment (shared by every tenant on it) | dotnet user-secrets (dev) or appsettings.Production.json (deployed) — never the database, never git |
| OAuth connection (tokens, company) | One per tenant (SiteID) | QuickBooksConnection table, tokens encrypted at rest |
| Customer/Job/Item/Invoice links | One per tenant (SiteID) | QuickBooksEntityLink table |
"The client_id query parameter is missing from the authorization request"
The app never actually loaded a Client ID from config — usually means the secret was set in a different execution context than the one running the app (e.g. set from a terminal, but the app was started from a different process/session), or the app wasn't restarted after setting it. Confirm the value is really in the config the running app reads, then restart.
"The redirect_uri query parameter value is invalid"
The URI CM sent doesn't exactly match one of the URIs registered in Intuit's Settings → Redirect URIs page. Check for scheme (http vs https), port, trailing slash, and stray whitespace pasted into the field.
"Line item(s) not mapped to a QuickBooks Item: ..."
Exactly what it says — go map the listed Cost Item(s) on the Item Mapping tab, then retry the sync.
"BadRequest. Details: Required parameter Line is missing in the request"
This one slips past CM's own mapping check because it's a different problem: the Invoice genuinely has zero line items. QuickBooks requires at least one line on any Invoice. Pick a different test Invoice that actually has items, or add items to this one first.
Can't sign into the right Intuit account — it keeps offering old accounts
Open a private/incognito browser window, or go to accounts.intuit.com and sign out of everything first, then retry the Connect flow fresh.
Intuit's own consent screen: "Uh oh, there's a connection problem. Sorry, but undefined didn't connect."
This is what Intuit's generic broken-page looks like when the client_id CM sent was blank or missing — not a mismatch (that gives the clearer "redirect_uri query parameter" error above), a genuinely empty value. Happened for real (2026-09-10) the first time cmblazor tried to connect: its appsettings.Production.json had never had a "QuickBooks" section added at all — the deploy workflow deliberately never touches that file, so a brand-new environment starts with nothing there until someone adds it by hand (see Part 1, step 4). Check that the environment's own appsettings.Production.json actually has real ClientId/ClientSecret values (not just an empty placeholder section), then recycle that site's IIS app pool.
Intuit's Redirect URIs page: "Failed to save. Please try again."
Usually a duplicate entry — Intuit silently rejects the save if the same URI appears twice in the list (easy to do if you paste one in, aren't sure it took, and paste it again). Scroll through the existing rows for an exact duplicate before assuming something else is wrong.
The whole QuickBooks Actions page crashes / blank white page, instead of showing "Not Connected"
Real incident, 2026-09-10: a QuickBooksConnection row got copied from one server's database into another's via a full DB backup/restore (e.g. a local dev CMDevDB backup restored onto an IONOS environment). The stored tokens are encrypted with that original server's own ASP.NET Data Protection key ring — every server has its own independent key ring, so the destination server can't decrypt them and throws CryptographicException: The key {...} was not found in the key ring, taking the whole page down instead of just showing "Not Connected." Fixed in code (the repository now catches this and treats it as no connection, safe to reconnect) — if you're on a build from before that fix, the workaround is DELETE FROM QuickBooksConnection WHERE SiteID = <id> on that environment's database, then reconnect fresh from that same environment so the new tokens are encrypted with its own key.
"Line item(s) not mapped ... (Material)" / "(Labor)" / "(Sub)" / "(Equipment)"
The Invoice line has real dollars of that specific cost type, but its Cost Category has no QuickBooks Item mapped for that type on the Mapping tab's Cost-Type Split table. Map just that one type for that Category — the other three types on the same category are unaffected.
Class/Department/Payment Term dropdown is empty on the Mapping tab
Not a bug — this tenant's QuickBooks company doesn't have Class/Location tracking turned on, or has it on with zero entries created yet. See Part 3, step 7 above.