0

I have been working with C# trying to implement Azure Identity Manager. I have a Razor front-end which calls a .net core back-end API.

When I use

builder.Services.AddMicrosoftIdentityWebAppAuthentication(builder.Configuration)

in the front-end, everytime I relaunch the app I have to login again if I want to gain the access token to call the back-end API.

But when I use builder.Services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme).AddMicrosoftIdentityWebApp(builder.Configuration) I don't have to login everytime to gain the access token.

Are there any other differences between these two when I use Azure Active Directory to login at the front-end to send an access code to the back-end? Also why, do I have to login again with the first approach and not with the second one?

The answer to this post says that the first method is just a fancy way of doing the second method. But then why does the first method not store the access token so it can be used after relaunching the app?

TomNet01
  • 1
  • 2

0 Answers0