Power BI Header Auth icon

Power BI Header Auth

Work with the Power BI API using header authentication

Overview

This node facilitates interaction with the Microsoft Power BI API using header-based authentication. Specifically, the Refresh Token operation under the Token resource allows users to refresh an OAuth2 access token by exchanging a valid refresh token for a new access token. This is essential in scenarios where the original access token has expired or is about to expire, enabling continuous authenticated access without requiring the user to reauthorize.

Practical examples include:

  • Automating workflows that require long-running or repeated access to Power BI resources.
  • Maintaining seamless integration with Power BI APIs in applications or automation pipelines by programmatically refreshing tokens.
  • Avoiding manual intervention for token renewal in scheduled data syncs or report generation tasks.

Properties

Name Meaning
Authentication Token Bearer token for authentication (without the "Bearer" prefix). Used for general API calls except token operations.
Token URL URL of the Microsoft Entra ID token endpoint to request the refreshed token. Default: https://login.microsoftonline.com/common/oauth2/v2.0/token
Client ID Application client ID registered in Microsoft Entra ID.
Client Secret Secret key of the application registered in Microsoft Entra ID.
Refresh Token Refresh token obtained from a previous token response, used to request a new access token.
Redirect URI The redirect URI used in the original authorization request; must match exactly.
Grant Type OAuth2 grant type, fixed as "refresh_token" for this operation.
Scope Space-separated list of scopes requested for access. Default includes Power BI API and offline access scopes.

Output

The node outputs JSON data containing the refreshed token information returned by the Microsoft Entra ID token endpoint. Typically, this includes:

  • access_token: The new access token to be used for subsequent API requests.
  • expires_in: Duration in seconds before the access token expires.
  • refresh_token: (Optional) A new refresh token if issued.
  • Other OAuth2 token response fields such as token_type, scope, etc.

If the node supports binary output, it would generally relate to any binary content returned by other operations, but for the Refresh Token operation, the output is purely JSON.

Dependencies

  • Requires access to Microsoft Entra ID OAuth2 token endpoint.
  • Needs valid application registration in Microsoft Entra ID with client ID and client secret.
  • Requires a valid refresh token previously obtained via OAuth2 authorization code flow.
  • No internal credential types are exposed; users must provide credentials and tokens explicitly.
  • Network connectivity to the specified token URL endpoint.

Troubleshooting

  • Missing or invalid refresh token: The operation will fail if the provided refresh token is missing, expired, or revoked. Ensure the refresh token is current and correctly input.
  • Incorrect client credentials: Errors occur if the client ID or client secret do not match the registered application. Verify these values carefully.
  • Redirect URI mismatch: The redirect URI must exactly match the one used during the initial authorization request; otherwise, the token endpoint will reject the request.
  • Scope issues: Requesting scopes not granted or incorrectly formatted may cause errors. Use space-separated scopes as required.
  • Network or endpoint errors: Ensure the token URL is reachable and correct. Default is the common Microsoft Entra ID token endpoint.
  • Error messages: Common error responses from the token endpoint include invalid_grant, invalid_client, or unauthorized_client. These indicate problems with the refresh token, client credentials, or app permissions respectively.

To resolve errors:

  • Double-check all input parameters.
  • Confirm the refresh token is still valid.
  • Review application registration settings in Microsoft Entra ID.
  • Inspect error details returned in the node output for specific guidance.

Links and References


This summary is based on static analysis of the node's source code and property definitions related to the Token resource's Refresh Token operation.

Discussion