Power BI Header Auth icon

Power BI Header Auth

Work with the Power BI API using header authentication

Token → Refresh Token

AI-generated

Summary

Refresh an access token using an OAuth2 refresh token by sending the required credentials and parameters to the Microsoft Entra ID token endpoint.

Inputs

  • Authentication Token (required) — Bearer token for authentication (without the "Bearer" prefix). Required for authentication but hidden for this operation.
  • Token URL (required) — URL for Microsoft Entra ID token endpoint, defaulting to https://login.microsoftonline.com/common/oauth2/v2.0/token.
  • Client ID (required) — Application client ID registered in Microsoft Entra ID.
  • Client Secret (required) — Secret key of application registered in Microsoft Entra ID.
  • Refresh Token (required) — Refresh token received from a previous token response.
  • Redirect URI (required) — The redirect URI used in the original authorization request.
  • Grant Type (required) — The OAuth2 grant type to use; typically 'refresh_token'.
  • Scope (required) — Space-separated list of scopes for which access is requested, defaulting to https://analysis.windows.net/powerbi/api/.default offline_access.

Output shape

a JSON object representing the refreshed access token response from Microsoft Entra ID.

Returns the raw token response, typically including a new access token and possibly a new refresh token. Errors from the token endpoint are returned in the output as well.

Examples

Example 1: Refresh a Power BI access token with a previously obtained refresh token

Provide all required parameters including clientId, clientSecret, refreshToken, redirectUri, and ensure the tokenUrl points to the Microsoft Entra ID OAuth2 token endpoint.

Discussion