Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I'm trying to use the PBI API to export reports to .png. I followed the docs to get an app registered in Azure and received an App ID and Secret.
How do I create the Authorization header for API request using AppID and Secret?
The only examples I've been able to find all use C# or Java to create a "token". I don't have these tools at my disposal. Need an alternative, preferrably also using REST API of some sort.
Thank you
Solved! Go to Solution.
I figured it out. My client_secret had both a "+" and a "=" in it. I had to use the Flow action of encodeUriComponent.
Sweet!
Following up here... the request I created above successfully returns a token, however the token is rejected when make a call to PowerBI REST API.
Why could that be?
Thank you for the resources. I've read through them.
My challenge is trying to access the PBI REST API from outside PowerBI (from Power Automate in this case). In the video example you shared, the person is using the Client_ID from their Azure registered app along with their own Username and Password to generate an access token.
This will not work in my case.
I need to generate a token with Client_ID and Client_Secret. How is this done?
The error I'm receiving is Invalid Client Secret (though I've checked and double checked that the secret is correct):
{
"error": "invalid_client",
"error_description": "AADSTS7000215: Invalid client secret is provided.\r\nTrace ID: 947ff77d-fc36-480d-a58c-011c126e7400\r\nCorrelation ID: 2af5df99-2ff6-41cb-a094-ca7d5750ef99\r\nTimestamp: 2021-02-24 17:30:39Z",
"error_codes": [
7000215
],
"timestamp": "2021-02-24 17:30:39Z",
"trace_id": "947ff77d-fc36-480d-a58c-011c126e7400",
"correlation_id": "2af5df99-2ff6-41cb-a094-ca7d5750ef99",
"error_uri": "https://login.microsoftonline.com/error?code=7000215"
}
I figured it out. My client_secret had both a "+" and a "=" in it. I had to use the Flow action of encodeUriComponent.
Sweet!
Hi @ericOnline ,
Please refer to the links.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
2 | |
2 | |
1 | |
1 |