verifyIdToken for Microsoft social provider is ignored #2813

Closed
opened 2026-03-13 10:21:46 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @mifopen on GitHub (Feb 3, 2026).

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

  1. add microsoft social provider to config
  2. add verifyIdToken to it
  3. try sign in passing existing idToken

Current vs. Expected behavior

current: Provider does not support id token verification
expected: token verification

What version of Better Auth are you using?

1.5.0-beta.11

System info

-

Which area(s) are affected? (Select all that apply)

Backend

Auth config (if applicable)


Additional context

No response

Originally created by @mifopen on GitHub (Feb 3, 2026). ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce 1. add microsoft social provider to config 2. add verifyIdToken to it 3. try sign in passing existing idToken ### Current vs. Expected behavior current: `Provider does not support id token verification` expected: token verification ### What version of Better Auth are you using? 1.5.0-beta.11 ### System info ```bash - ``` ### Which area(s) are affected? (Select all that apply) Backend ### Auth config (if applicable) ```typescript ``` ### Additional context _No response_
Author
Owner

@better-auth-agent[bot] commented on GitHub (Feb 3, 2026):

It seems that the Microsoft social provider's verifyIdToken feature is currently not supporting token verification as you experienced. In your case, it would be best to refer to any ongoing issues or discussions regarding this functionality. There is an open issue related to the support and verification of ID tokens for social providers, which might address or shed light on your situation.

While it's not confirmed that this specific feature is implemented for the Microsoft social provider in version 1.5.0-beta.11 that you're using, I recommend keeping an eye on updates in the issue tracker or discussing it further with the Better Auth team for more precise insights. Please tag @bekacru or @ping__ for a more direct response from the Better Auth team regarding your inquiry.

Is there anything else about Better Auth or token verification that you'd like to explore?

If you need more help, tag @better-auth-agent in a comment so I can respond.

DiagramDiscordGitHub

Diagram Join Star

@better-auth-agent[bot] commented on GitHub (Feb 3, 2026): It seems that the Microsoft social provider's `verifyIdToken` feature is currently not supporting token verification as you experienced. In your case, it would be best to refer to any ongoing issues or discussions regarding this functionality. There is an open issue related to the support and verification of ID tokens for social providers, which might address or shed light on your situation. While it's not confirmed that this specific feature is implemented for the Microsoft social provider in version 1.5.0-beta.11 that you're using, I recommend keeping an eye on updates in the issue tracker or discussing it further with the Better Auth team for more precise insights. Please tag @bekacru or @ping__ for a more direct response from the Better Auth team regarding your inquiry. Is there anything else about Better Auth or token verification that you'd like to explore? _If you need more help, tag @better-auth-agent in a comment so I can respond._ <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) • [Discord](https://discord.gg/better-auth) • [GitHub](https://github.com/better-auth/better-auth) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/better-auth) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/better-auth/better-auth)
Author
Owner

@dosubot[bot] commented on GitHub (Feb 3, 2026):

The Microsoft social provider in Better Auth v1.5.0-beta.11 does not support ID token verification via verifyIdToken. When you add verifyIdToken to the Microsoft provider config and attempt to sign in with an existing idToken, the framework ignores this option and returns the error "Provider does not support id token verification" because the feature is not implemented for Microsoft. The provider only decodes the idToken to extract user info, without verifying its signature or claims. This is a known limitation and is the expected behavior as of your version reference.

There are no documented workarounds for enabling verifyIdToken for Microsoft in Better Auth. If you need this feature, you would need to implement manual ID token verification in a custom provider, or monitor future releases for updates reference. Recent changes have added verifyIdToken support for Google, but not for Microsoft reference.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Feb 3, 2026): <!-- Answer --> The Microsoft social provider in Better Auth v1.5.0-beta.11 does not support ID token verification via verifyIdToken. When you add verifyIdToken to the Microsoft provider config and attempt to sign in with an existing idToken, the framework ignores this option and returns the error "Provider does not support id token verification" because the feature is not implemented for Microsoft. The provider only decodes the idToken to extract user info, without verifying its signature or claims. This is a known limitation and is the expected behavior as of your version [reference](https://github.com/better-auth/better-auth/blob/583f12fb7db38681ee882d219ce3895faa4a6976/packages/core/src/social-providers/microsoft-entra-id.ts#L142-L259). There are no documented workarounds for enabling verifyIdToken for Microsoft in Better Auth. If you need this feature, you would need to implement manual ID token verification in a custom provider, or monitor future releases for updates [reference](https://github.com/better-auth/better-auth/issues/6379). Recent changes have added verifyIdToken support for Google, but not for Microsoft [reference](https://github.com/better-auth/better-auth/pull/6614). <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/2cf0039d-2a1e-4a6f-9155-e5cc6bb47d4a?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/2cf0039d-2a1e-4a6f-9155-e5cc6bb47d4a?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/2cf0039d-2a1e-4a6f-9155-e5cc6bb47d4a?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/2cf0039d-2a1e-4a6f-9155-e5cc6bb47d4a?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/2cf0039d-2a1e-4a6f-9155-e5cc6bb47d4a?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/2cf0039d-2a1e-4a6f-9155-e5cc6bb47d4a?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/2cf0039d-2a1e-4a6f-9155-e5cc6bb47d4a?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/cdda13d9-dd27-4d31-b09a-5d8bec92de21/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=The%20Microsoft%20social%20provider%20in%20Better%20Auth%20v1.5.0-beta.11%20does%20not%20support%20ID%20token%20verification%20via%20verifyIdToken.%20When%20you%20add%20verifyIdToken%20to%20the%20Microsoft%20provider%20config%20and%20attempt%20to%20sign%20in%20with%20an%20existing%20idToken%2C%20the%20framework%20ignores%20this%20option%20and%20returns%20the%20error%20%22Provider%20does%20not%20support%20id%20token%20verification%22%20because%20the%20feature%20is%20not%20implemented%20for%20Microsoft.%20The%20provider%20only%20decodes%20the%20idToken%20to%20extract%20user%20info%2C%20without%20verifying%20its%20signature%20or%20claims.%20This%20is%20a%20known%20limitation%20and%20is%20the%20expected%20behavior%20as%20of%20your%20version%C2%A0%5Breference%5D%28https%3A//github.com/better-auth/better-auth/blob/583f12fb7db38681ee882d219ce3895faa4a6976/packages/core/src/social-providers/microsoft-entra-id.ts%23L142-L259%29.%0A%0AThere%20are%20no%20documented%20workarounds%20for%20enabling%20verifyIdToken%20for%20Microsoft%20in%20Better%20Auth.%20If%20you%20need%20this%20feature%2C%20you%20would%20need%20to%20implement%20manual%20ID%20token%20verification%20in%20a%20custom%20provider%2C%20or%20monitor%20future%20releases%20for%20updates%C2%A0%5Breference%5D%28https%3A//github.com/better-auth/better-auth/issues/6379%29.%20Recent%20changes%20have%20added%20verifyIdToken%20support%20for%20Google%2C%20but%20not%20for%20Microsoft%C2%A0%5Breference%5D%28https%3A//github.com/better-auth/better-auth/pull/6614%29.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/better-auth/better-auth/issues/7776)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#2813