79640300

Date: 2025-05-27 10:42:17
Score: 3
Natty:
Report link

My goal is to only allow authenticated users from my Azure AD tenant to access the API and keep below setting

Even I have tried to use both Allow authenticated users from Azure AD tenant to access the API and the Require authentication option in Azure Web App but getting the same error.

Easy Auth generates a token, and we are also manually generating a token using AddMicrosoftIdentityWebApi and [Authorize]. These two tokens might be causing a conflict.

So, you can choose either one of the Authentication methods Easy Auth or Azure AD Authentication.

If you use Easy Auth, to access api/controller endpoint, follow below steps:

enter image description here

enter image description here

enter image description here

If you want full control over authentication inside your ASP. NET app use Azure Ad Authentication.

Reasons:
  • RegEx Blacklisted phrase (2): Even I have
  • Long answer (-1):
  • Has code block (-0.5):
  • Me too answer (2.5): getting the same error
Posted by: Aslesha Kantamsetti