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
1 Answer
Reset to default 0I 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
版权声明:本文标题:.net - AADSTS50011: The redirect URI http does not match the redirect URIs - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736673292a1947039.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论