疑难解答 - 无法为此数据库创建或检索混合Troubleshooting - Unable to create or retrieve a mashup for this database

使用“根据数据新建实体(技术预览版)”功能时,可能会看到以下错误:When using the New Entities from Data (Technical Preview) feature, you might run into an error that looks like the following:

*Unable to create or retrieve a mashup for the current database*

如果使用此功能,以利用 Power Query 根据外部数据源中的数据在 Common Data Service (CDS) 中创建自定义实体,可能会看到此错误。This can occur when you're using the feature to create Custom Entities in the Common Data Service (CDS) based on data from external data sources using Power Query. 当 Power Query 无法访问在 PowerApps 或 CDS 中访问组织数据时,便会触发此错误。The error is triggered when Power Query cannot access the organization's data in PowerApps or CDS. 此错误分为两种情况:There are two scenarios when this can happen:

  • Azure Active Directory (AAD) 租户管理员已禁止用户同意应用代表他们访问公司数据。An Azure Active Directory (AAD) tenant administrator has disallowed users' ability to consent to apps accessing company data on their behalf.
  • 使用非托管 Active Directory 租户。Using an unmanaged Active Directory tenant. 非托管租户是不含全局管理员的目录,旨在完成自助注册服务。An unmanaged tenant is a directory without a global administrator that was created to complete a self-service signup offer. 若要解决这种情况的问题,用户必须先转换为托管租户,然后再使用以下部分中描述的两个解决方案之一解决此问题。To fix this scenario, users must first convert to a managed tenant, then follow one of the two solutions to this issue, described in the following section.

上述问题有两种解决方法:There are two ways to fix the issue described above:

  • 让 AAD 管理员按照必要步骤操作,允许用户同意应用代表他们访问公司数据Have the AAD administrator follow the steps necessary for users to consent to apps accessing company data
  • 让 AAD 管理员允许 Power Query 访问数据Have the AAD administrator allow Power Query to access data

下面介绍了这些解决方案的所有必要步骤。Each of the steps necessary for these solutions are described next.

可以联系 AAD 管理员,让他/她按照下列步骤操作,允许用户同意任意应用代表他们访问公司数据:You can contact the AAD tenant administrator, and have him or her perform the following steps, which enables users to consent to any app accessing company data:

  1. 访问 https://portal.azure.comVisit https://portal.azure.com
  2. 打开“Azure Active Directory”边栏选项卡。Open the Azure Active Directory blade.
  3. 选择“用户设置”。Select User settings.
  4. 选中“用户可以同意应用代表他们访问公司数据”旁边的“是”,再选择“保存”。Select Yes next to Users can consent to apps accessing company data on their behalf, and then select Save.
  5. 完成此过程后,问题便会得到解决。Once that process is completed, the issue will be resolved.

这可能是最简单的方法,但与下一种方法相比,允许的权限更为宽泛。This is perhaps the easiest approach, but it allows for broader permissions than the next option.

允许 Power Query 访问公司数据Allowing Power Query to access company data

另一种解决方案是让租户管理员允许 Power Query 访问公司数据,而不修改全租户权限。Another solution is to have the tenant administrator give consent to Power Query without modifying tenant-wide permissions. 为此,请让租户管理员按照下列步骤操作:Have the tenant administrator take the following steps achieve this:

  1. 安装 Azure PowerShellInstall Azure PowerShell
  2. 运行以下 PowerShell 命令:Run the following PowerShell commands:
    • Login-AzureRmAccount(并以租户管理员身份登录)Login-AzureRmAccount (and sign in as the tenant admin)
    • New-AzureRmADServicePrincipal -ApplicationId f3b07414-6bf4-46e6-b63f-56941f3f4128New-AzureRmADServicePrincipal -ApplicationId f3b07414-6bf4-46e6-b63f-56941f3f4128

与全租户解决方案相比,此方法的优势在于,这种解决方案非常具有针对性。The advantage of this approach (versus the tenant-wide solution) is that this solution is very targeted. 它仅预配 Power Query 服务主体,不会对租户进行其他任何权限更改。It provisions only the Power Query service principal, but no other permission changes are made to the tenant.