MetricSign
EN|NLRequest Access
Medium severitycompilation

Power BI Refresh Error:
ModelAccessViolation

What does this error mean?

A dbt project tried to ref a model whose access level does not permit cross-project or cross-group references, causing a compilation error when the access constraint is violated.

Common causes

  • 1A consuming project's ref() targets a model set to 'protected' access, which cannot be used in cross-project refs
  • 2A model's access was downgraded from 'public' to 'protected' after other projects were already referencing it
  • 3The consuming project's dependencies.yml targets an older version of the upstream project where the model was public
  • 4A CI pipeline tests cross-project refs without the correct dbt Cloud environment linkage

How to fix it

  1. 1Step 1: Check the access property of the upstream model in its YAML config file.
  2. 2Step 2: If the model should be cross-project accessible, set access: public and redeploy the upstream project.
  3. 3Step 3: If the model should remain protected, update the consuming project to use a different model or move the logic into a shared public model.
  4. 4Step 4: In dbt Cloud, confirm the upstream project's production environment is marked as the official source for downstream projects.
  5. 5Step 5: Run 'dbt compile --project-dir <consuming-project>' to validate the fix.

Frequently asked questions

Can I set access level at the folder level instead of per model?

Yes. In dbt_project.yml, you can set access under the models key to apply a default access level to all models in a directory. Individual model YAML files can override the folder-level default.

Does changing a model from public to protected break existing runs immediately?

Yes — all downstream projects with a ref() to that model will fail to compile on their next run. Always coordinate access downgrades across all consuming teams before merging the change.

Other compilation errors