Initiate Microsoft OAuth
Auth
Microsoft OAuth
Initiate a Microsoft Azure AD OAuth 2.0 login flow.
GET
Initiate Microsoft OAuth
GET
openid, profile, email, User.Read
Flow
- Browser navigates to
GET /api/auth/microsoft-auth - Server redirects to Microsoft login / consent screen
- User authenticates and Microsoft redirects to
/api/auth/microsoft-auth/callback?code=... - Server exchanges the code for profile, creates/finds the user, issues a local JWT
- Server redirects to:
https://app.webyes.com/auth/callback?token=<jwt>
Callback Parameters
string
required
Authorization code from Microsoft. Handled server-side automatically.
Response
302 Redirect to the frontend with the JWT as a query parameter.Response
302
Redirect to Microsoft login