Forum Discussion
Use Assign workspace for pipline Api
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:
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.