首页 > 解决方案 > ADFS Redirect_URI 不起作用如何重定向另一个 url?

问题描述

我在依赖方下配置了两个 SAML 断言消费者,如下所示:

配置图像

现在,当我在查询字符串中启动登录 url(作为 redirect_uri)时,它总是重定向到默认页面而不是第二个 url,那么我如何重定向到第一个索引上的 url?

在我为登录而启动的网址下方: https ://fs.in.rptech.com/adfs/ls/idpinitiatedsignon?loginToRp=https://10.1.3.38:9090&redirect_uri=https://localhost:4435

标签: javascriptc#samladfs

解决方案


SAML supports embedding additional information into RelayState for each authentication request.

To embed RelayState into an IDP-initiated login request with ADFS, you will need to encode your desired RelayState and SPID. An online tool to generate IDP-initiated login link is also available.

Notice that it is not possible to embed RelayState when you are using the loginToRp parameter.

You will need to Set-AdfsProperties -EnableRelayStateForIdpInitiatedSignOn in your ADFS server first.

And your application needs to retrieve the RelayState attribute from SAMLReponse and do the actual redirection.


推荐阅读