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

Get all Dataset (Semantic Model) or Report Users via Semantic Link or Semantic Labs

Hi,

 

Has anyone the knowledge how to get all specific dataset or report users (who has access to) via python in semantic link or/and labs?

 

Thanks in advance for your help!

1 ACCEPTED SOLUTION
ibarrau
Super User
Super User

Hi. I'm not sure about running this with semantic link. However, you can get it with the PowerBi Rest API as an Admin (or the setting that allows service principals to use admin api).

The admin API let's you run requests like:

https://learn.microsoft.com/en-us/rest/api/power-bi/admin/datasets-get-datasets-as-admin

You can get all datasets in the tenant. You can also run a request to get all the datasets in an specific workspace. Then if you want to check users at the dataset you can run:

https://learn.microsoft.com/en-us/rest/api/power-bi/admin/datasets-get-dataset-users-as-admin

That should give you the users and permission at dataset.

You can do the same for reports, there are requests for that if you look up there.

 

In order to make it simple you can use the SimplePBI python library that helps you with the power bi api: https://pypi.org/project/SimplePBI/

You also check this blog post to get started with service principal to use the API: https://blog.ladataweb.com.ar/post/740398550344728576/seteo-powerbi-rest-api-por-primera-vez

 

I hope that helps,


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

Happy to help!

LaDataWeb Blog

View solution in original post

3 REPLIES 3
ibarrau
Super User
Super User

Hi. I'm not sure about running this with semantic link. However, you can get it with the PowerBi Rest API as an Admin (or the setting that allows service principals to use admin api).

The admin API let's you run requests like:

https://learn.microsoft.com/en-us/rest/api/power-bi/admin/datasets-get-datasets-as-admin

You can get all datasets in the tenant. You can also run a request to get all the datasets in an specific workspace. Then if you want to check users at the dataset you can run:

https://learn.microsoft.com/en-us/rest/api/power-bi/admin/datasets-get-dataset-users-as-admin

That should give you the users and permission at dataset.

You can do the same for reports, there are requests for that if you look up there.

 

In order to make it simple you can use the SimplePBI python library that helps you with the power bi api: https://pypi.org/project/SimplePBI/

You also check this blog post to get started with service principal to use the API: https://blog.ladataweb.com.ar/post/740398550344728576/seteo-powerbi-rest-api-por-primera-vez

 

I hope that helps,


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

Happy to help!

LaDataWeb Blog

Thank You ibarrau!

Indeed this is the option, fortunately i know it, but still hoping having it in semantic link somewhere - would be just more convienient to have it within all other data which is possible to get

The API it's not that hard with simplepbi. Don't worry. Semantic Link will stay inside the workspace you are running the code. You can get datasets like:

import sempy.fabric as fabric
df_datasets = fabric.list_datasets()

That will show you the datasets for the workspace. However, I'm not sure that's enough for getting users, reports and info from all tenant.

Regards


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

Happy to help!

LaDataWeb Blog

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