简体   繁体   中英

Get the access token in an Azure integrated ASP.NET Core MVC application

We have the following requirements

  1. Create an ASP.NET Core 3.1 MVC web application
  2. Add application registration
  3. Integrate Azure authentication for login and logout
  4. Get the access token to call other APIs

We have done 1 and 2 they are very straight forward.

We need guidance on how to get the access token,

  1. Can we get the access token during the login process itself?
  2. If not is there are any oob way of getting the access token after the login process. Thought it would be simple enough.

Thank you.

To get a token, you need to authenticate the user with a known account in an Azure Active Directory. Look at app registrations and using single sign-on. The user will be redirected to a login page that will authenticate the user and send back the token.

https://docs.microsoft.com/en-us/azure/active-directory/manage-apps/what-is-application-management

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM