Actions36
- Admin Actions
- Dashboard Actions
- Dataflow Actions
- Dataset Actions
- Gateway Actions
- Group Actions
- Report Actions
- Token Actions
Token → Get Service Principal Token
AI-generatedSummary
Obtain an OAuth2 access token for a Microsoft Entra ID (Azure AD) service principal using client credentials to access specified Power BI API resources.
Inputs
- Authentication Token (required) — Bearer token for authentication (without the "Bearer" prefix); used for request authorization.
- Tenant ID (required) — Microsoft Entra ID (Azure AD) tenant ID associated with the service principal.
- Client ID (required) — Application (client) ID registered in Microsoft Entra ID representing the service principal.
- Client Secret (required) — Secret key for the registered application used to authenticate the service principal.
- API Resource (required) — The resource URI for which the access token is requested, e.g., Power BI API (default: https://analysis.windows.net/powerbi/api).
- Grant Type (required) — OAuth2 grant type to use; typically 'client_credentials' for service principal authentication.
Output shape
a JSON object containing the access token and related OAuth2 token details
The output includes the access token allowing authenticated requests to the specified API resource via the service principal credentials. Errors during token acquisition will be included in the output if 'Continue On Fail' is active.
Examples
Example 1: Get a service principal token to call the Power BI API
Provide tenant ID, client ID, client secret, API resource (Power BI endpoint), grant type (client_credentials), and an initial authentication token to authorize this request.