Home > Mobile >  Microsoft Graph and redirect_uri http instead of https
Microsoft Graph and redirect_uri http instead of https

Time:12-07

I trying to authenticate with Microsoft Graph 2 using ASP.Net Core (MVC).

The AzureAd settings:

"AzureAd": {
"Instance": "https://login.microsoftonline.com/",
"TenantId": "common",
"CallbackPath": "/signin-oidc"  }

The site url is like

https://mysite

Then I was redirected to the login url:

https://login.microsoftonline.com/common/oauth2/v2.0/authorize?...

but the redirect_uri, in the url parameters, does not include the https

https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=****&redirect_uri=http://mysite/signin-oidc

I was trying to force the using of HTTPS but I can´t find it

Upate:

The application is deployed in Linux.

Any suggestion?

CodePudding user response:

Adding in dockerfile:

ENV ASPNETCORE_FORWARDEDHEADERS_ENABLED=true

it works for me like comment Anand´s link

  • Related