how to do a sso with microsoft and get back a access token in asp.net mvc?

Mateo Skenderi 0 Reputation points
2023-07-13T21:46:47.3633333+00:00

I have a asp.net mvc application. Now I want to add a sso with Microsoft. So there will be a button which offers the user the possibility to authenticate with Microsoft account. Upon clicking the button I want the user to login with a Microsoft account and then retrieve an access token which I can use for calling Microsoft Graph Api.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,995 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
9,903 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,163 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 52,401 Reputation points
    2023-07-14T00:52:51.2966667+00:00

    You are probably looking for azure b2c

    https://learn.microsoft.com/en-us/azure/active-directory-b2c/overview

    if the Microsoft account are defined in your azure ad then it’s Microsoft identities openid support

    https://learn.microsoft.com/en-us/azure/active-directory/fundamentals/auth-oidc

    0 comments No comments