Skip to main content
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Power BI is turning 10! Letโ€™s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
dpiresm92
Regular Visitor

Error "LRO API Error: 'Alm_InvalidRequest_PurgeRequired' - Dataset e66.."

Hi,

After removing one table from the Semantic Model, the Azure Pipeline start failing to deploy the semantic model.

I am using Approach 4 "Deploy content by using only Azure Pipelines" from Microsoft Documentation - Power BI implementation planning: Deploy content

dpiresm92_0-1744624805126.png

The script I've been using was got from Analysis-Services/pbidevmode/fabricps-pbip at master ยท microsoft/Analysis-Services from @RuiRomanoMS  

Thatยดs the PowerShell script responsible to deploy the semantic model and report. ( I just added parameters so that I can get as Enviroment Variables in the Azure Pipeline )

dpiresm92_1-1744625149030.png

 

 

1 ACCEPTED SOLUTION
v-kpoloju-msft
Community Support
Community Support

Hi @dpiresm92,
Thank you for reaching out to the Microsoft fabric community forum. Thank you @Deku, for your inputs on this issue.

โ€‹The error message you are encounteringโ€”"LRO API Error: 'Alm_InvalidRequest_PurgeRequired'"โ€”indicates that the deployment process is failing because the semantic model's schema has changed. Specifically, a table has been removed, and the existing dataset in the target environment contains outdated data that does not match the updated schema.

If you are not currently incorporating scripting into your deployment pipeline, you can: Access the Power BI Service, navigate to the target workspace, and manually delete the dataset (this will remove the old schema and associated data). Then, redeploy the semantic model using your existing pipeline.

 

Automate the Purge Step (Recommended for CI/CD pipelines): To ensure a fully automated pipeline, add a purge step using the XMLA endpoint before deployment. This can be achieved using PowerShell, Azure CLI, or tools like Tabular Editor. The purge clears the dataset content to accept the updated schema. For instance, PowerShell with the Invoke-ASCmd command is a common method used in CI/CD workflows.

For additional context, Microsoft has published guidance on common deployment errors, including the Alm_InvalidRequest_PurgeRequired issue, in their CI/CD troubleshooting documentation:
Troubleshoot the Fabric lifecycle management tools. - Microsoft Fabric | Microsoft Learn

Also please go through the solved link for more information:
Solved: Re: Deployment Pipeline loses bindings and create... - Microsoft Fabric Community

If this post helps, then please give us โ€˜Kudosโ€™ and consider Accept it as a solution to help the other members find it more quickly.

Thank you for using Microsoft Community Forum.

View solution in original post

3 REPLIES 3
RuiRomanoMS
Microsoft Employee
Microsoft Employee

I consider this to be a bug, I'm discussing internally how to handle it. It may be caused by a semantic model change that causes data loss in the target semantic model such as change of a column data type.


In the meantime, a workaround is to use the FABCLI and run a refresh clear command on the target semantic model before deploying.

- Install FAB CLI - fabric-cli | โšก Microsoft Fabric CLI
- Run the following command:

api -X post /groups/<workspace id>/datasets/<semantic model id>/refreshes
 -i {"type": "ClearValues"} -A powerbi

- deplloy the semantic model

 

As mentioned by others you can also use SSMS to run a refresh clear command.

v-kpoloju-msft
Community Support
Community Support

Hi @dpiresm92,
Thank you for reaching out to the Microsoft fabric community forum. Thank you @Deku, for your inputs on this issue.

โ€‹The error message you are encounteringโ€”"LRO API Error: 'Alm_InvalidRequest_PurgeRequired'"โ€”indicates that the deployment process is failing because the semantic model's schema has changed. Specifically, a table has been removed, and the existing dataset in the target environment contains outdated data that does not match the updated schema.

If you are not currently incorporating scripting into your deployment pipeline, you can: Access the Power BI Service, navigate to the target workspace, and manually delete the dataset (this will remove the old schema and associated data). Then, redeploy the semantic model using your existing pipeline.

 

Automate the Purge Step (Recommended for CI/CD pipelines): To ensure a fully automated pipeline, add a purge step using the XMLA endpoint before deployment. This can be achieved using PowerShell, Azure CLI, or tools like Tabular Editor. The purge clears the dataset content to accept the updated schema. For instance, PowerShell with the Invoke-ASCmd command is a common method used in CI/CD workflows.

For additional context, Microsoft has published guidance on common deployment errors, including the Alm_InvalidRequest_PurgeRequired issue, in their CI/CD troubleshooting documentation:
Troubleshoot the Fabric lifecycle management tools. - Microsoft Fabric | Microsoft Learn

Also please go through the solved link for more information:
Solved: Re: Deployment Pipeline loses bindings and create... - Microsoft Fabric Community

If this post helps, then please give us โ€˜Kudosโ€™ and consider Accept it as a solution to help the other members find it more quickly.

Thank you for using Microsoft Community Forum.

Deku
Community Champion
Community Champion

Interesting not seen that before. It sounds like it wants you to delete all the data. You can do this with XMLA endpoint by running a clear values on the table in question or the model. Can you SSMS or enchanted refresh API.

https://learn.microsoft.com/en-us/analysis-services/tmsl/refresh-command-tmsl?view=asallproducts-all...

 

You could see if Fabric CICD is more robust


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

Check out the May 2025 Power BI update to learn about new features.

May 2025 Monthly Update

Fabric Community Update - May 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors