將 Microsoft SharePoint 資料來源與 Amazon Bedrock Knowledge Bases 同步時,我收到以下錯誤: 「Failed to connect to the URL of your data source.Please check the URL, access permissions, and data source configuration」。
解決方法
檢查 Secrets Manager 祕密組態
請確認您已正確設定 AWS Secrets Manager 祕密。
對於 SharePoint 僅限應用程式憑證,祕密必須包含以下鍵值組:
- sharePointClientId 和 clientId 都是您註冊 SharePoint 用戶端應用程式時,由 SharePoint 產生的用戶端 ID。
- clientSecret 是為 Microsoft Entra SharePoint 應用程式產生的用戶端祕密。
注意: 如需產生用戶端祕密的相關資訊,請參閱 Microsoft 網站上的在 Microsoft Entra ID 中新增及管理應用程式憑證。
- sharePointClientSecret 是您註冊應用程式時,由 SharePoint 產生的用戶端祕密。
注意: 若要產生 sharePointClientId, clientID 和 sharePointClientSecret,請註冊您的應用程式。如需更多資訊,請參閱 Microsoft 網站上的使用 SharePoint 僅限應用程式模式授予存取權。如果您已註冊應用程式,但未儲存用戶端祕密,就必須重新註冊 SharePoint 應用程式。您只能在建立用戶端祕密時查看其值。
對於 SharePoint OAuth 2.0 驗證,祕密必須包含以下鍵值組:
- username 是您的 Microsoft Entra 租用戶 ID。
注意: 如需尋找 ID 的相關資訊,請參閱 Microsoft 網站上的如何尋找 Microsoft Entra 租用戶 ID。
- password 是 SharePoint 管理員密碼。
- sharePointClientId 是您註冊應用程式時,由 SharePoint 產生的 OAuth 應用程式用戶端 ID。
- sharePointClientSecret 是 OAuth 應用程式用戶端祕密。
注意: 使用者名稱和密碼必須屬於 SharePoint 帳戶管理員。
(僅限 OAuth 2.0 驗證) 授予必要的 API 權限
SharePoint 應用程式必須具有 SharePoint: AllSites.Read (Delegated) 和 Microsoft Graph > Sites.FullControl.All (Type=Delegated) 權限,才能讀取所有網站集合中的項目。
若要進一步縮小 API 權限範圍,請使用 SharePoint: Sites.Read.All (Application)、Microsoft Graph > GroupMember.Read.All (Application) 和 Microsoft Graph > User.Read.All (Application)。
此外,請停用 Security defaults (安全性預設值) 和多重要素驗證 (MFA),以確保 SharePoint 帳戶允許 Amazon Bedrock 編目網站內容。如需停用此功能的步驟,請參閱 Microsoft 網站上的 Microsoft Entra ID 中的安全性預設值。
檢查網路組態
您的 SharePoint 應用程式不得使用 IP 位址允許清單,也不得設有 VPN 限制。此組態可確保 Amazon Bedrock 能夠編目 SharePoint 內容。
請確認您已將 Allow access only from specific IP address ranges (僅允許從特定 IP 位址範圍存取) 設為 Off (關閉)。如需更新此設定的步驟,請參閱 Microsoft 網站上的根據網路位置控制 SharePoint 和 OneDrive 資料的存取權。
確認您符合 SharePoint 網址要求
您的 SharePoint 網址必須符合以下要求:
- 網址以 https 開頭,且包含 sharepoint.com。範例:https://yourcompany.sharepoint.com/sites/SiteName
- 網址指向您的實際 SharePoint 網站。
- 網址不得指向特定 SharePoint 網站以外的位置,也不得指向網站內的特定位置。
注意: 您只能使用 SharePoint Online 網域。您無法使用自訂網域的網址。
注意: 提供新增 SharePoint 資料來源所需的詳細資訊時,請務必將 Domain (網域) 參數設為 yourcompany,而非 yourcompany.sharepoint.com。