Stack Auth
GuidesSDKComponentsAPI Reference
Back to home
Platform
OverviewFAQ
Getting Started
Setup
Concepts
Backend IntegrationUser AuthenticationTeams ManagementJWT Tokens
Other
Self-hostCLI Authentication
Stack Auth Docs

Microsoft

This guide explains how to set up Microsoft as an authentication provider with Stack Auth. Microsoft OAuth allows users to sign in to your application using their Microsoft account.

For Development purposes, Stack Auth uses shared keys for this provider. Shared keys are automatically created by Stack, but show Stack's logo on the OAuth sign-in page. You should replace these before you go into production.

Integration Steps

Create a Microsoft OAuth App

  1. Navigate to the Microsoft Entra admin center (formerly Azure AD).
  2. In the left sidebar, go to Applications > App registrations.
  3. Click New registration at the top of the page.
  4. Enter a name for your application.
  5. Under Supported account types, select the option that best suits your needs (typically Accounts in any organizational directory and personal Microsoft accounts).
  6. In the Redirect URI section, select Web as the platform and enter https://api.stack-auth.com/api/v1/auth/oauth/callback/microsoft
  7. Click Register to create the application.
  8. You'll be redirected to the app's Overview page. Note the Application (client) ID displayed at the top.
  9. In the left sidebar, click Certificates & secrets.
  10. Under Client secrets, click New client secret.
  11. Add a description, select an expiration period, and click Add.
  12. Copy the Value of the client secret immediately (you won't be able to see it again).

Enable Microsoft OAuth in Stack Auth

  1. On the Stack Auth dashboard, select Auth Methods in the left sidebar.
  2. Click Add SSO Providers and select Microsoft as the provider.
  3. Set the Client ID (Application ID) and Client Secret you obtained from the Microsoft Entra admin center.

Need More Help?

  • Check the Microsoft identity platform Documentation
  • Join our Discord

Table of Contents

Navigate this page

On this page

Integration StepsCreate a Microsoft OAuth AppEnable Microsoft OAuth in Stack AuthNeed More Help?

Stack Auth AI

Documentation assistant

Experimental: AI responses may not always be accurate—please verify important details.

For the most accurate information, please join our Discord or email us.

How can I help?

Ask me about Stack Auth while you browse the docs.