I have a .Net core app. I trying to use AzureAd Authentication. It's working fine on LocalHost but when I deployed the app on my company server I faced an issue of Proxy Credentials. I used the below code but Not working:
services.AddAuthentication(AzureADDefaults.AuthenticationScheme)
.AddAzureAD(options => Configuration.Bind("AzureAd", options))
.AddOpenIdConnect(options => options.BackchannelHttpHandler = new HttpClientHandler
{
UseProxy = true,
Proxy = new WebProxy
{
Credentials = new NetworkCredential
{
UserName = "my_UserName",
Password = "my_Password "
},
Address = new Uri("my_Domain:my_Port")
}
});
appsettings:
"AzureAd": {
"Instance": "https://login.microsoftonline.com/",
"Domain": "My_Domain",
"TenantId": "*************",
"ClientId": "******",
"CallbackPath": "/signin-oidc"
}