The Issue

I recently completed a project where we migrated Analysis Services models to Power BI Premium datasets. Since Power BI datasets are nothing but AS tabular models, it's easy to copy/paste (manually or using C# scripts) tabular model objects such as relationships, measures, calculated columns, hierarchies, RLS roles etc. Everything went smoothly except when we set up deployment pipelines for CI/CD, it failed with an error that gave no clue why it was failing. We created a support ticket with Microsoft but they were stumped as well. They suggested using Large Dataset Format to resolve the error but that did not work. But after several tests, I figured out the issue.

The Solution

The solution was simple: Change the Model Permission from Administrator to Read. The original model had Administrator role defined for one of the roles. When the object properties were copied, I copied everything along with the associated metadata. For a Power BI dataset, the security roles and access are defined in the service and not in the Power BI dataset. If you keep the Model Permission as Administrator, the Power BI dataset still works and refreshes fine but the Deployment Pipeline will fail. Don't ask me how long it took to figure this out!