Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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!
Solved! Go to Solution.
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,
Happy to help!
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,
Happy to help!
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
Happy to help!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!