[PR #4149] [MERGED] feat(microsoft): add support for setting authority #30824

Closed
opened 2026-04-17 21:50:32 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4149
Author: @Stadly
Created: 8/22/2025
Status: Merged
Merged: 8/26/2025
Merged by: @himself65

Base: canaryHead: feat/microsoft-authority


📝 Commits (1)

  • af7faec feat(microsoft): add support for setting authority

📊 Changes

2 files changed (+12 additions, -2 deletions)

View changed files

📝 docs/content/docs/authentication/microsoft.mdx (+4 -0)
📝 packages/better-auth/src/social-providers/microsoft-entra-id.ts (+8 -2)

📄 Description

This pull request adds support for customizing the authentication authority URL for Microsoft Azure Entra ID integration, allowing users to specify different endpoints for standard Entra ID and CIAM scenarios. The changes update both documentation and implementation to make the authority configurable.

Microsoft Entra ID authority URL support:

  • Added a new authority option to the MicrosoftOptions interface in microsoft-entra-id.ts, allowing users to specify a custom authentication authority URL for Entra ID or CIAM scenarios.
  • Updated the implementation in microsoft-entra-id.ts to use the provided authority value when constructing the authorization and token endpoints, defaulting to https://login.microsoftonline.com if not specified.

Documentation updates:

  • Updated the authentication documentation in microsoft.mdx to include the new authority option and explain when to use different authority URLs for standard Entra ID versus CIAM.

Summary by cubic

Adds a configurable authority URL for Microsoft Entra ID OAuth, enabling both standard and CIAM endpoints. Defaults to https://login.microsoftonline.com for backward compatibility.

  • New Features
    • New authority option in MicrosoftOptions; used to build authorize/token endpoints with tenantId.
    • Docs updated with examples and guidance for standard vs CIAM authority URLs.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/4149 **Author:** [@Stadly](https://github.com/Stadly) **Created:** 8/22/2025 **Status:** ✅ Merged **Merged:** 8/26/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `feat/microsoft-authority` --- ### 📝 Commits (1) - [`af7faec`](https://github.com/better-auth/better-auth/commit/af7faecf563b6ea63bff6377eb6540bf4655b5ee) feat(microsoft): add support for setting authority ### 📊 Changes **2 files changed** (+12 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/authentication/microsoft.mdx` (+4 -0) 📝 `packages/better-auth/src/social-providers/microsoft-entra-id.ts` (+8 -2) </details> ### 📄 Description This pull request adds support for customizing the authentication authority URL for Microsoft Azure Entra ID integration, allowing users to specify different endpoints for standard Entra ID and CIAM scenarios. The changes update both documentation and implementation to make the authority configurable. **Microsoft Entra ID authority URL support:** * Added a new `authority` option to the `MicrosoftOptions` interface in `microsoft-entra-id.ts`, allowing users to specify a custom authentication authority URL for Entra ID or CIAM scenarios. * Updated the implementation in `microsoft-entra-id.ts` to use the provided `authority` value when constructing the authorization and token endpoints, defaulting to `https://login.microsoftonline.com` if not specified. **Documentation updates:** * Updated the authentication documentation in `microsoft.mdx` to include the new `authority` option and explain when to use different authority URLs for standard Entra ID versus CIAM. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds a configurable authority URL for Microsoft Entra ID OAuth, enabling both standard and CIAM endpoints. Defaults to https://login.microsoftonline.com for backward compatibility. - **New Features** - New authority option in MicrosoftOptions; used to build authorize/token endpoints with tenantId. - Docs updated with examples and guidance for standard vs CIAM authority URLs. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-17 21:50:32 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#30824