restpowerbiazure-data-factorymetadata

Power BI Metadata using Azure Data Factory (ADF)


I am trying to download metadata from Power BI and then store it in Snowflake. However, I'm having troubles with accessing API with my app.

What I have done so far:

  1. Registered an app (permissions: Report.Read.All, Dataset.Read.All, Workspace.Read.All) - please mind that these permissions do not require admin consent
  2. Created a Security Group
  3. Added the app to the security group
  4. Enabled 'Service principals can use Fabric APIs' in Power BI and added the Security Group to 'Apply to' Power BI settings

5. Added the security group as a member to the particular workspace 6.I have created Linked Service in ADF: REST Base URL: https://api.powerbi.com/v1.0/myorg/ Authentication: Service Principal Test Connection - Successful 7. Created REST dataset (Linked Service as above) Relative URL: "admin/activityevents?startDateTime=2024-12-15T07:55:00.000Z&endDateTime=2024-12-30T07:55:00.000Z" 8. Created COPY DATA activity with above dataset + linked service

I get the following error: "...Rest call failed with client error, status code 403 Forbidden, please check your activity settings. Response: {"Message":"API is not accessible for application"}..."

And at this point I do not know what to do... What I tried:

I am not so sure what should be done next.

The "Power BI Service Administrator" role has not been granted to the service principal as I read that it is not necessary as long as 'Service principals can use Fabric APIs' has been enabled in Power BI.

Could anybody help?


Solution

  • To use Admin API, please enable the below setting as well for service principal enter image description here

    enter image description here