2017-06-13 306 views
2

我正嘗試在Azure AD B2C中使用Azure AD Auth使用/ common Azure AD enpoint。據How to sign in any Azure Active Directory (AD) user using the multi-tenant application pattern,需要有一種機制,要麼:多租戶Azure AD Auth Azure AD B2C使用自定義策略

  1. 允許多個發行人,或
  2. 指定發行商B2C可以驗證對列表。

我在自定義策略XML中看不到任何可能的設置,允許這樣做。我能夠在我的TrustFrameworkExtensions.xml文件中成功創建Azure AD認證,現在不是多租戶。

回答

4

爲了支持多租戶Azure AD,您需要使用不同的值在自定義策略中配置您的ClaimsProvider。

使用下面的值,確保使用client_id和IdTokenAudience進行替換。

<Item Key="DiscoverMetadataByTokenIssuer">true</Item> 
<Item Key="ValidTokenIssuerPrefixes">https://sts.windows.net/</Item> 
<Item Key="authorization_endpoint">https://login.microsoftonline.com/common/oauth2/authorize</Item> 
<Item Key="client_id">df5b2515-a8d2-4d91-ab4f-eac6e1e416c2</Item> 
<Item Key="BearerTokenTransmissionMethod">AuthorizationHeader</Item> 
<Item Key="scope">openid</Item> 
<Item Key="UsePolicyInRedirectUri">false</Item> 
<Item Key="HttpBinding">POST</Item> 
<Item Key="response_types">id_token</Item> 
<Item Key="IdTokenAudience">df5b2515-a8d2-4d91-ab4f-eac6e1e416c2</Item> 

注意:此功能是沒有正式即使在預覽還,所以請謹慎使用。繼續監控​​以查看完整記錄和支持的時間。