1

我们正在为我们的提供商托管创建一个本地测试环境。基本上,它是一个为多租户(分区服务等)准备的场。我们还使用 ADFS 进行身份验证。

为我们的应用程序创建站点后,我们创建了一个租户,我们称他为 Tenant1 并使用以下步骤安装应用程序:

1) 使用 appregnew.aspx 注册应用程序 2) 使用以下 PowerShell 注册证书

    $certificate = Get-PfxCertificate $publicCertPath
    New-SPTrustedRootAuthority -Name $authorityName -Certificate $certificate
    $spweb = Get-SPWeb $targetTenantSite
    $realm = Get-SPAuthenticationRealm -ServiceContext $spweb.Site
    $fullIssuerIdentifier = $issuerId + '@' + $realm
    New-SPTrustedSecurityTokenIssuer -Name $authorityName -Certificate $certificate -RegisteredIssuerName $fullIssuerIdentifier -IsTrustBroker

3) 将 ClientID 和 IssuerID 添加到 web.config。

一切正常,所以我们添加了一个新租户,我们称他为 Tenant2。从 Office365<->Azure 环境中得知,我们希望使用在为租户 1 注册应用程序时生成的相同数据在 appregnew.aspx 中注册应用程序(以便我们可以使用具有相同发行者和客户端 ID 的站点)。之后,我们再次使用 powershell 为 Tenant2 注册证书。但是,当尝试从 Tenant2 运行应用程序时,我们会收到 401 Unauthorized 异常。对于 Tenant1,该应用程序运行良好。

有什么我们想念的吗?

4

0 回答 0