@Abhay It seems that the issue you're experiencing is related to the configuration of your Azure App Service. To troubleshoot this issue, there are a few things you can check:
First, make sure that your App Service is properly configured to use Azure AD authentication. You can do this by going to the Azure portal, selecting your App Service, and then going to the "Authentication / Authorization" section. Ensure that the "App Service Authentication" is turned on and that the "Action to take when request is not authenticated" is set to "Log in with Azure Active Directory".
Next, check if the App Service has the correct environment variables set up. You can do this by going to the Azure portal, selecting your App Service, and then going to the "Configuration" section. Ensure that the "AzureAD:ClientId" and "AzureAD:ClientSecret" environment variables are set up correctly.
Also, check if the App Service is running on the correct environment. You can do this by going to the Azure portal, selecting your App Service, and then going to the "Configuration" section. Ensure that the "ASPNETCORE_ENVIRONMENT" environment variable is set up correctly.
Additionally, check if the App Service is using the correct version of the .NET Core runtime. You can do this by going to the Azure portal, selecting your App Service, and then going to the "Configuration" section. Ensure that the "ASPNETCORE_RUNTIME_VERSION" environment variable is set up correctly.
If none of the above steps work, you can try enabling diagnostic logging for your App Service and checking the logs to see if there are any errors related to authentication.