当我将我的 Microsoft SharePoint 数据来源与 Amazon Bedrock 知识库同步时,我收到以下错误: “无法连接到您的数据来源的 URL。请检查 URL、访问权限和数据来源配置”。
解决方法
检查您的 Secrets Manager 密钥配置
确保您已正确配置 AWS Secrets Manager 密钥。
对于 SharePoint App-Only 凭证,密钥必须包含以下键值对:
**注意:**要生成 sharePointClientId 和 sharePointClientSecret,请注册您的应用程序。有关详细信息,请参阅 Microsoft 网站上的 Granting access using SharePoint App-Only。如果您已经注册了应用程序但没有保存客户端密钥,则必须重新注册 SharePoint 应用程序。您只能在创建客户端密钥时查看该密钥。
对于 SharePoint OAuth2.0 身份验证,密钥必须包含以下键值对:
- username 是您的 Microsoft Entra 租户 ID。
**注意:**有关如何查找您的 ID 的信息,请参阅 Microsoft 网站上的 How to find your Microsoft Entra tenant ID。
- password 是 Microsoft Entra 管理员账户的密码。
- sharePointClientId 是 SharePoint 在您注册应用程序时生成的 OAuth 应用程序客户端 ID。
- sharePointClientSecret 是 OAuth 应用程序的客户端密钥。
**注意:**用户名和密码必须属于 SharePoint 账户管理员。
授予所需的 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)。
此外,请停用安全默认值和多重身份验证 (MFA),以确保 SharePoint 账户允许 Amazon Bedrock 爬取站点内容。有关停用此功能的步骤,请参阅 Microsoft 网站上的 Security defaults。
检查您的网络配置
您的 SharePoint 应用程序不得使用 IP 地址允许列表或具有 VPN 限制。此配置可确保允许 Amazon Bedrock 爬取您的 SharePoint 内容。
确保将 Allow access only from specific IP address ranges(仅允许从特定 IP 地址范围访问)设置为 Off(关闭)。有关更新此设置的步骤,请参阅 Microsoft 网站上的 Set a location-based policy in the new SharePoint admin center。
确保遵守 SharePoint URL 要求
您的 SharePoint URL 必须符合以下要求:
- 该 URL 以 https 开头,且包含 sharepoint.com。示例:https://yourcompany.sharepoint.com/sites/SiteName
- 该 URL 指向您实际的 SharePoint 站点。
- 该 URL 不指向特定 SharePoint 站点之外或站点内的特定位置。
**注意:**您只能使用 SharePoint 在线域。您不能使用自定义域 URL。
**注意:**当您提供添加 SharePoint 数据来源的详细信息时,请确保将 Domain(域)参数设置为 yourcompany,而不是 yourcompany.sharepoint.com。