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
AnasZiq
Frequent Visitor

Use Assign workspace for pipline Api

When I am trying to assign my workspace to the Power BI pipeline using the GUI, I encounter this message:

AnasZiq_0-1709754586540.png

I will press continue and every things works fine.
But when I am tring to assign workspace form assignWorkspace api, I have this error 

AnasZiq_1-1709754654244.png

How to solve this issue, how can I make it force assign like the continue button on the GUI ? 

3 REPLIES 3
Anonymous
Not applicable

Hi, @AnasZiq 

 

Ensure that the Assign workspace API is used correctly. Pay close attention to the required permissions and the structure of the request body. You can check the following case:

 

Pipelines - Assign Workspace - REST API (Power BI Power BI REST APIs) | Microsoft Learn

 

The error you are encountering may be related to insufficient permissions. Depending on the requirements of the API, make sure that the account you use for API calls has at least the Viewer role on the workspace. For more details on permissions, see the documentation:

 

Automate your deployment pipeline by using APIs and Azure DevOps - Microsoft Fabric | Microsoft Lear...

 

Because the API is in preview, there may be limitations or known issues. Make sure you're using the latest version of the API and review the Power BI REST API documentation:

 

Power BI REST APIs for embedded analytics and automation - Power BI REST API | Microsoft Learn

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

My service principle user is an admin in this workspace, and I am using the last version and also I have read the documentation.

GilbertQ
Super User
Super User

Hi @AnasZiq 

 

It appears to me that when this is done by the GUI due to the prompt, it will exclude those items in assinging a workspace by when this is done via the API Any error causes the entire court to fail I'm not sure how this can be done. The only other option is to vote or create an idea at https://ideas.powerbi.com





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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