admin管理员组

文章数量:1125782

I already tried with other similar topics opened in the past for the same error, but mine is a bit different. the URI that I am trying to use for redirect is already registered in azure AD. let's say:

My application was deployed to a server with apache2 configured and it is using https by default.

However, the error message from Microsoft says: AADSTS50011: The redirect URI '' specified in the request does not match the redirect URIs configured for the application

And of course I see that the URL captured by microsoft takes the URL with HTTP from the request instead of taking the https URI. So this is causing the trouble because there is no any URI registered starting with http. Microsoft requires that URIs starts with HTTPS except for localhost URIs.

I already tried with other similar topics opened in the past for the same error, but mine is a bit different. the URI that I am trying to use for redirect is already registered in azure AD. let's say: https://api.mydomain.com

My application was deployed to a server with apache2 configured and it is using https by default.

However, the error message from Microsoft says: AADSTS50011: The redirect URI 'http://api.mydomain.com/signin-oidc' specified in the request does not match the redirect URIs configured for the application

And of course I see that the URL captured by microsoft takes the URL with HTTP from the request instead of taking the https URI. So this is causing the trouble because there is no any URI registered starting with http. Microsoft requires that URIs starts with HTTPS except for localhost URIs.

Share Improve this question edited Jan 9 at 7:57 Qiang Fu 8,1231 gold badge6 silver badges16 bronze badges asked Jan 9 at 4:09 willyMonwillyMon 6298 silver badges20 bronze badges 2
  • Please provide code that you have tried? – Aslesha Kantamsetti Commented Jan 9 at 6:53
  • Do use HTTPS instead of HTTP for the redirect URL. The RedirectURL must match exactly. including the scheme part. – Tore Nestenius Commented Jan 9 at 7:01
Add a comment  | 

1 Answer 1

Reset to default 0

I think you could use "RedirectUri" instead of "CallbackPath" in appsettings to specify the full path.

  "AzureAd": {
    ...
    //"CallbackPath": "/signin-oidc",
    "RedirectUri": "https://api.mydomain.com/signin-oidc"
  },

本文标签: netAADSTS50011 The redirect URI http does not match the redirect URIsStack Overflow