March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
1. I was able to genrate Accesstoken using : (Works in postman)
POST - https://login.microsoftonline.com/{{tenant_id}}/oauth2/token
Header:
Content-Type application/x-www-form-urlencoded
Body:
grant_type: client_credentials
client_secret: {{client_secret}}
client_id: {{client_id}}
resource: https://analysis.windows.net/powerbi/api
(works fine)
2. Get EmbedToken (Does not work in postman):
I could get the EmbedToken using link below.
https://learn.microsoft.com/en-us/rest/api/power-bi/embed-token/datasets-generate-token-in-group
(for our prototype, we will not want to use above step)
Using Postman I have tried many different scenarios, it all fails
POST - https://api.powerbi.com/v1.0/myorg/groups/{{groupId}}/reports/{{reportId}}/GenerateToken
Header:
Authorization: Bearer {{temp_access_token}}
Host: <calculated when request is sent>
Content-Type: application/json
Body:
Result:
POST -https://api.powerbi.com/v1.0/myorg/groups/{{groupId}}/reports
Header:
Authorization: Bearer {{temp_access_token}}
Error:
Solved! Go to Solution.
Finally, I made it work.. Here are all the details:
(I beleive my problem was with setting up Service Principal properly)
1. Access Token: POST
Header
Body
2. Embed Token: POST
Header
Body
3. EmbedReportURL: GET
Finally, I made it work.. Here are all the details:
(I beleive my problem was with setting up Service Principal properly)
1. Access Token: POST
Header
Body
2. Embed Token: POST
Header
Body
3. EmbedReportURL: GET
hello @Anonymous
Appreciate your response.
I did both, it still does not work, I get HTTP Error 400, The request hostname is invalid. Error.
Hello @Jamir ,
I had the same issue and adding these headers worked
URL: https://api.powerbi.com/v1.0/myorg/groups/d...c5/reports/da9.....3/GenerateToken
Body:
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
8 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
9 | |
3 | |
2 | |
2 | |
2 |