Which Version of Microsoft Identity Web are you using ?
Microsoft Identity Web 1.0.0-preview
Where is the issue?
- Web App
- Web API
- Token cache serialization
Other? - please describe;
Probably valid for most cases.
Is this a new or existing app?
This is an experiment to test an app with Microsoft.Identity.Web deployed to Azure App Service for Docker Containers.
Repro
- Open example 1-2-AnyOrg
- Add Docker support in Visual Studio (create standard Dockerfile)
- Build image
- Publish to container registry
- Create a new App Service using the container image
- Add configuration
- Browse new web app, and you will be redirected to login.microsoftonline.com as expected, but with
redirect_uri=http%3A%2F%2F<your app service name>.azurewebsites.net%2Fsignin-oidc instead of redirect_uri=https%3A%2F%2F<your app service name>.azurewebsites.net%2Fsignin-oidc .
- Manually changing the redirect URI to HTTPS will enable authentication and the app will work as expected.
Expected behavior
Expected to be redirected to the HTTPS-page.
Actual behavior
Error AADSTS50011 is shown in the browser, as there is a mismatch between registered redirect-URIs.
Possible Solution
Maybe there is a way to configure the App Service to avoid this issue? Or is there a way to configure Microsoft.Identity.Web to use HTTPS in the redirect URI?
Additional context/ Logs / Screenshots
The application log shows the following:
Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]: Failed to determine the https port for redirect.
There is a hint here that SSL should not be enabled in the web app, but how is it possible to not have SSL enabled in the web app, but still have HTTPS in the redirect URI?
Which Version of Microsoft Identity Web are you using ?
Microsoft Identity Web 1.0.0-preview
Where is the issue?
Other? - please describe;
Probably valid for most cases.
Is this a new or existing app?
This is an experiment to test an app with Microsoft.Identity.Web deployed to Azure App Service for Docker Containers.
Repro
redirect_uri=http%3A%2F%2F<your app service name>.azurewebsites.net%2Fsignin-oidcinstead ofredirect_uri=https%3A%2F%2F<your app service name>.azurewebsites.net%2Fsignin-oidc.Expected behavior
Expected to be redirected to the HTTPS-page.
Actual behavior
Error AADSTS50011 is shown in the browser, as there is a mismatch between registered redirect-URIs.
Possible Solution
Maybe there is a way to configure the App Service to avoid this issue? Or is there a way to configure Microsoft.Identity.Web to use HTTPS in the redirect URI?
Additional context/ Logs / Screenshots
The application log shows the following:
Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]: Failed to determine the https port for redirect.There is a hint here that SSL should not be enabled in the web app, but how is it possible to not have SSL enabled in the web app, but still have HTTPS in the redirect URI?