Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
8 | |
4 | |
2 | |
2 |
User | Count |
---|---|
4 | |
3 | |
3 | |
3 | |
2 |