Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/336.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 具有Azure AD的多租户联合网关_C#_Azure Active Directory_Identityserver4_Ws Federation - Fatal编程技术网

C# 具有Azure AD的多租户联合网关

C# 具有Azure AD的多租户联合网关,c#,azure-active-directory,identityserver4,ws-federation,C#,Azure Active Directory,Identityserver4,Ws Federation,我有一个Identity server 4应用程序,有几个应用程序连接到它。这些应用程序是由子域名分隔的多租户 我正在尝试为这些租户中的每一个设置Azure广告。问题是,可以随时动态添加其他租户。我无法在启动中添加每个租户。有没有一种方法可以自动实时加载其他联合身份验证方法 services.AddAuthentication() .AddWsFederation(options => { // MetadataAddress represents the Active Direc

我有一个Identity server 4应用程序,有几个应用程序连接到它。这些应用程序是由子域名分隔的多租户

我正在尝试为这些租户中的每一个设置Azure广告。问题是,可以随时动态添加其他租户。我无法在启动中添加每个租户。有没有一种方法可以自动实时加载其他联合身份验证方法

services.AddAuthentication()
.AddWsFederation(options =>
{
    // MetadataAddress represents the Active Directory instance used to authenticate users.
    options.MetadataAddress = "https://<ADFS FQDN or AAD tenant>/FederationMetadata/2007-06/FederationMetadata.xml";

    // Wtrealm is the app's identifier in the Active Directory instance.
    // For ADFS, use the relying party's identifier, its WS-Federation Passive protocol URL:
    options.Wtrealm = "https://localhost:44307/";

    // For AAD, use the App ID URI from the app registration's Properties blade:
    options.Wtrealm = "https://wsfedsample.onmicrosoft.com/bf0e7e6d-056e-4e37-b9a6-2c36797b9f01";
});
services.AddAuthentication()
.AddWsFederation(选项=>
{
//MetadataAddress表示用于对用户进行身份验证的Active Directory实例。
options.MetadataAddress=”https:///FederationMetadata/2007-06/FederationMetadata.xml";
//Wtrealm是Active Directory实例中应用的标识符。
//对于ADF,使用依赖方的标识符,即其WS-Federation被动协议URL:
options.Wtrealm=”https://localhost:44307/";
//对于AAD,使用应用注册的属性刀片中的应用ID URI:
options.Wtrealm=”https://wsfedsample.onmicrosoft.com/bf0e7e6d-056e-4e37-b9a6-2c36797b9f01";
});

您可以使用OpenID连接设置连接到“公共”权限,并为重定向到身份提供程序事件定义一个事件处理程序,该事件将该权限替换为租户的权限。然后,您还需要在发卡机构返回后验证其是否符合预期。不知道是否可以使用ws-fed进行验证。顺便问一下,你使用它有什么特别的原因吗?@juunas becouse WS-fed是我能找到的唯一可以让我设置多个Azure广告的东西,如果你有另一个想法,我可能会开始Googling@DaImTo可能样品就是你们要找的。但考虑相关issue@d_f任何关于如何获取树中第一个克隆主节点的代码的想法都不会返回它。