When you create and publish a composite model using DirectQuery for Power BI datasets and Analysis Services, you should pay attention to the minimal permissions required to consume data.

For example, consider the following scenario:

  • Base is a shared dataset published on a Power BI workspace
  • Proxy is a composite model that has a connection to the Base database and one local table.

When you publish a report based on the Proxy dataset, every time the user connects to Proxy there is a connection established between Proxy and Base. This connection is possible only if the user has the proper permissions on both Proxy and Base datasets. In other words, if the user does not have enough permission on Base, the following error could appear:

Cannot load model

Couldn’t load the model schema associated with this report. Make sure you have a connection to the server, and try again.

Please check the technical details for more information. If you contact support, please provide these details.

  • Underlying Error PowerBI service client received error HTTP response. HttpStatus: 400. PowerBIErrorCode: QueryUserError
  • QueryUserError Failed to get CSDL.

The minimal permission required are the following:

  • Base: Viewer, Build
  • Proxy: Viewer

Indeed, the Viewer permission is not enough to use composite models. The missing part is the Build permission, which is not part of the permission provided when the user has the Viewer permission on a workspace.

In order to assign the Build permission on a dataset for Viewer users you have to:

  • Select the Manage permissions context menu for the Base dataset.
  • Click the Direct access tab that lists the users that have access to the dataset.
  • Click the Add build context menu for the user that must be enabled to access Base through the Proxy composite model.
  • Make sure that the user has now both Viewer and Build permissions on the Base dataset.

Setting the right minimal permissions for a dataset is important in an enterprise environment, also to guarantee that security roles are correctly applied to the reports.

Please note that these screenshots have been made in June 2021. Power BI user interface could change over time. Pay attention to possible future changes in the UI.