# Managed Google and Microsoft sign-in

Setting up OIDC usually means the customer's IT admin registers an app in Google Cloud or Entra ID and sends you a client ID and secret. With a managed connection, OhAuthCat's own multi-tenant Google and Microsoft apps are used instead, and the connection is bound to the organization.

Create an OIDC connection with `POST /v1/connections` and `oidc_managed` instead of a discovery URL, client ID and secret: `provider` is `google_workspace` or `microsoft_entra`, and Entra connections also take `entra_tenant_id`.

- **Google Workspace:** the token's `hd` claim and the email domain must both be domains the organization verified.
- **Microsoft Entra ID:** the token's `tid` must be the organization's `entra_tenant_id`, and the email must be on a verified domain.

Personal accounts (gmail.com, outlook.com and the like) are refused unless you set `allow_personal_accounts: true`; the verified-domain rule still applies. Refusals answer [`oidc_tenant_mismatch`](/errors/oidc_tenant_mismatch/), [`oidc_tenant_claim_missing`](/errors/oidc_tenant_claim_missing/) or [`oidc_personal_account_refused`](/errors/oidc_personal_account_refused/); if the managed apps are unavailable, [`managed_oidc_unavailable`](/errors/managed_oidc_unavailable/).

The managed apps' verification with Google and Microsoft is in progress; check the connection with a test sign-in before you rely on it.
