SteelBird82
SteelBird82

Reputation: 769

C# How to AutomaticAuthentication in WebApp, which is using Azure AD for authentication?

I am following the below sample to enable authentication using Azure AD:

https://github.com/AzureADSamples/WebApp-WebAPI-OpenIDConnect-DotNet

This example provides a signin option, when clicked does the authentication and recognizes the user.

Required behavior - What I am looking for is the user is automatically authenticated on entering the base Url.

Could someone help me on how to achieve this?

Upvotes: 0

Views: 89

Answers (1)

vibronet
vibronet

Reputation: 7394

The usual rules for ASP.NET authentication apply. For example, you can decorate your controller classes with [Authorize] - the first unauthenticated request will trigger the sign in flow.

Upvotes: 1

Related Questions