Skip to content

fix(oauth): scope the Microsoft preset to one tenant - #215

Merged
Bccorb merged 1 commit into
mainfrom
fix/microsoft-single-tenant
Oct 5, 2026
Merged

Bccorb merged 1 commit into
mainfrom
fix/microsoft-single-tenant

Conversation

@Bccorb

@Bccorb Bccorb commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

The Microsoft OAuth preset used the common endpoints, which accept a sign-in from any Entra tenant. An application that authenticates its own organization's people should be registered single-tenant and use that tenant's endpoints, which is Microsoft's own guidance for line-of-business apps.

Change

  • The Microsoft catalog entry uses https://login.microsoftonline.com/{tenant}/oauth2/v2.0/{authorize,token}
  • init --oauth asks for the directory (tenant) id when Microsoft is chosen. It accepts a GUID or a verified domain (contoso.onmicrosoft.com) and refuses common, organizations and consumers
  • With no tenant, Microsoft is scaffolded disabled with a REPLACE_WITH_MICROSOFT_TENANT_ID placeholder and reported as pending, the same as a missing client id
  • seamless help init mentions the tenant prompt

Projects scaffolded before this still point at common. The changeset tells them to replace it with their tenant id in OAUTH_PROVIDERS.

Checks

tsc --noEmit, npm run build, and the suite: 1027 passed, 4 skipped (8 new tests for the catalog, tenant validation and the prompt). Minor changeset.

Docs: fells-code/seamless-auth-docs#47.

init --oauth now asks for the Microsoft directory (tenant) id, refuses
common, organizations and consumers, and writes tenant-specific
endpoints.
@Bccorb
Bccorb merged commit 9ab5a2b into main Oct 5, 2026
3 checks passed
@Bccorb
Bccorb deleted the fix/microsoft-single-tenant branch October 6, 2026 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant