All B-Agent apps Home
Case study · B-Agent

B-Agent Platform

One home for every B-Agent product, with sign-in and seats.

Built it end to end: the React landing page and workspace, the Express licensing API, the WordPress theme and the shared Entra setup.

15Azure regions to choose from
9agents, one per business function
2languages, Turkish and English
The problem

B-Agent grew into many separate apps, each on its own subdomain with its own sign-in. Companies needed one place to find the products, sign in once and control which colleagues use which app.

The approach

One multi-tenant Entra app across every bagent.com.tr site, plus a small licensing control plane that stores seats per company and per product. The marketing site and the signed-in workspace share their content, and product apps check the same tokens and entitlements.

How it works

From request to answer, step by step.

  1. 01Marketing siteWordPress and React pages sharing one TR/EN translation file
  2. 02Microsoft sign-inOne multi-tenant Entra app, redirect bridge on every origin
  3. 03Tenant lookupCompany workspace resolved from the token's tenant id
  4. 04Seat checkWorkspace and per-product seats enforced at sign-in
  5. 05Admin consoleInvite colleagues, assign products, pick an Azure region
  6. 06Product appsValidate the same token and the company's entitlement

What it does

  • Product pages, pricing and contact, in Turkish and English.
  • Sign in with a Microsoft work account and land in your company's own workspace.
  • Company admins invite colleagues and choose who can use which product.
  • Pick the Azure region where your company's data and AI live.

Under the hood

  • Licensing control plane: seats per product per company, checked at sign-in.
  • One Entra ID model across every *.bagent.com.tr app.
  • The WordPress site and the React landing page share one TR/EN translation file.
Hard problems

What took real engineering.

Problem 1

One sign-in across many subdomains

Single-page apps cannot register wildcard redirect URIs, so every product origin gets the same small redirect bridge page, registered on one multi-tenant Entra app. Users are identified by tenant id plus object id in every app, and the API accepts a list of audiences, so a product with its own app registration still fits. Customers consent once, and every product validates the same issuer.

Problem 2

Two kinds of seats

Workspace seats cap how many people a company has; product seats cap how many of them can use a given product. A product with zero seats was not bought, so it cannot be assigned and never appears after sign-in, and limits are enforced both on save and at sign-in. Companies created before per-product licensing count as unlimited, so introducing it locked nobody out, and the last tenant admin can never be removed.

Built with
ReactViteExpressMSALWordPressDockerApp Service