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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
HalfNeck
New Member

Automate workspace access for a service principal

My organization uses a tool that scrapes metadata from various data platforms and they want to use this tool to look at Power BI.

 

The tool uses a service principal and calls the API to extract data, we have configured this and it works perfectly. The only issue here is that it requires access to a workspace to see the metadata within. We want to monitor everything in Power BI so I'd like to automate this task for new workspaces, when a new workspace is created I want this service principal to be added to the workspace.

 

I tried to automate this task using a service principal calling the admin APIs, however I can see that the APIs I want to use are not supported by service principals (I can't run any APIs using POST).

https://docs.microsoft.com/en-us/power-bi/enterprise/read-only-apis-service-principal-authentication

Is there a way I can automate this task without creating a traditional service account and giving this admin rights to Power BI? (I have already written a script using the PBI PS module, but the authentication/authorization is the bit I am struggling with).

 

Thanks in advance.

 

1 REPLY 1
v-henryk-mstf
Community Support
Community Support

Hi @HalfNeck ,

 

For powerbi its core business functionality is based on a data model that can generate visual objects and collections of visual objects that can be shared with others in the organization as reports.
But for your description, what is the approximate type of metadata that you are talking about accessing through the api, because the data format in powerbi is in columns of fields and each column can only have one data type.


Looking forward to your reply.


Best Regards,
Henry


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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors