184 字
1 分鐘
#8 自建Azure AD驗證機制 — 簡單入門Azure AD Q&A
2023-04-04
無標籤

上一篇講到自建一個SAML伺服器,並將網域設定為同盟(federation),就能夠在第三方進行驗證,今天補充一下可能遇到的狀況與解決辦法。


無法修改subdomain為同盟#

當我們AAD綁定了網域example.com,可以任意新增subdomain,如a.example.com、b.example.com,但當我們要把subdomain轉成同盟會出現以下錯誤:It is a subdomain and its authentication type is different from the authentication type of the root domain.。

看起來subdomain預設驗證機制跟上層是一樣的,因此我們需要將子網域變更為根網域,可以參考官方文件的教學。

進入Graph Explorer,先給予授權,需要Domain.ReadWrite.All。

接著Post到https://graph.microsoft.com/v1.0/{tenant-id}/domains/{subdomain}/promote,就可以了,body為空白。