Skip to main content

Power BI

New

Dataset Credentials API Endpoint (Check for OAuth 2.0 invalidation)

Vote (6) Share
John Kerski's profile image

John Kerski on 26 May 2023 16:16:26





Background:


When you pull a dataflow into a dataset or a SharePoint Online list, users can login in with their Organizational Account.


That token can become invalidated during security events.


It would be nice if there was a programmatic way to check for this issue, so we avoid failed refreshes. This would help keep with DataOps principle "Monitor quality and performance: Our goal is to have performance, security and quality measures that are monitored continuously to detect unexpected variation and generate operational statistics."


Proposed Idea:


  1. Retrieve dataset credentials: Use the Power BI REST API to retrieve the credentials associated with the dataset. You can make a GET request to the /datasets/{datasetId}/credentials endpoint, where {datasetId} is the unique identifier of the dataset you want to check.
  2. An array of credential objects should include information about the credential type, its expiration details and/or validation status.