This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Power BI admin APIs are not only instrumental in helping our admins with many administrative tasks, but they are also critical in examining activities and usage patterns that ensure governance and satisfy compliance or auditing requirements. Several months ago, we rolled out a series of APIs to provide insight into who has access to what Power BI assets (see previous blog entries here and here). Today we are adding new APIs to provide an inventory of reports and dashboards that are delivered via email subscriptions, shared with the entire tenant, or published to web. Read on to learn more!
How do these APIs help you as a Power BI service administrator? Sometimes reports or dashboard subscriptions do not go out as planned due to after-the-fact updates or data freshness issues. By using these APIs, you would be able to retrieve a list of subscriptions of impacted reports and notify subscribers.
3 separate APIs provide administrators with a list of subscriptions of a given report, a dashboard, or a Power BI user.
Below is an example of the API to retrieve a report’s subscriptions:
GET https://api.powerbi.com/v1.0/myorg/admin/reports/{reportID}/subscriptions{
"value": [
{
"id": "<redacted>",
"title": "2111080010000830_ASQL ",
"artifactId": "<redacted>",
"artifactDisplayName": "2111080010000830_ASQL",
"artifactType": "PaginatedReport",
"isEnabled": true,
"frequency": "Monthly",
"startDate": "11/16/2021 12:00:00 AM",
"endDate": "11/16/2022 12:00:00 AM",
"linkToContent": true,
"previewImage": false,
"owner": {
"emailAddress": "<redacted>",
"displayName": "Admin User",
"identifier": "<redacted>",
"graphId": "<redacted>",
"principalType": "User"
},
"users": [
{
"emailAddress": "<redacted>",
"displayName": "Admin User",
"identifier": "<redacted>",
"graphId": "<redacted>",
"principalType": "User",
"userType": "Member"
},
{
"emailAddress": "<redacted>",
"principalType": "User"
}
]
}
]
}How do these APIs help you as a Power BI administrator? Perhaps you have been asked by your Infosec team to keep track of Power BI reports that are shared with the entire company or have an active embed code allowing public access. These new APIs make it a breeze to compile this information.
For example, to get a list of all the reports that have been shared with everyone in the company, simply call:
GET https://api.powerbi.com/v1.0/myorg/admin/widelySharedArtifacts/linksSharedToWholeOrganization
{
"ArtifactAccessEntities": [
{
"artifactId": "<redacted>",
"displayName": "Human Resources Sample",
"artifactType": "Report",
"accessRight": "ReadReshare",
"shareType": "Link",
"sharer": {
"emailAddress": "<redacted>",
"displayName": "Admin User",
"identifier": "<redacted>",
"graphId": "<redacted>",
"principalType": "User"
}
},
...
]
}GET https://api.powerbi.com/v1.0/myorg/admin/widelySharedArtifacts/publishedToWeb
{
"ArtifactAccessEntities": [
{
"artifactId": "<redacted>",
"displayName": "Incremental Refresh",
"artifactType": "Report",
"accessRight": "None",
"shareType": "PublishToWeb",
"sharer": {
"emailAddress": "<redacted>",
"displayName": "<redacted>",
"identifier": "<redacted>",
"graphId": "<redacted>",
"principalType": "User"
}
}
]
}Learn more about this API on the documentation page.
Stay tuned for an upcoming Power BI Dev Camp session some time in February, during which we’ll provide additional guidance on using Admin APIs. In the meantime, check out this awesome session by Ted on Building Solutions using Power Automate and the Power BI REST API.
That’s it! As always, leave any feedback or questions in the comments below. We are always looking forward to hearing from you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.