Forum Discussion
shravanighosh
3 years agoFrequent Visitor
Troubleshooting 'Get report failed' Error When Embedding Power BI Report in webpage
I am trying to embed a Power BI report into my Laravel project using the Power BI REST API. The report is loading successfully. Although to load that report currently I am using an Access Token which...
- 3 years ago
As I mentioned you need to use an App registration to surpass the Outh2
Please watch this video
https://m.youtube.com/watch?v=2RZkc_qrV1g&t=610s
You need to be aware using this method will only get you the last 30 days of data.
shravanighosh
3 years agoFrequent Visitor
Hi lbendlin , As you said I decoded both tokens, and I found different payload data for both tokens. The one which I got from 'Microsoft-Learn Try It Rest Api' have scopes and the other one which I got from the postman request have 'roles' instead of 'scopes'. I am posting a difference here.
Please advice me what should I do to obtain the access token that I received from 'Microsoft REST API Try It Console'
Payload data in token I got from 'Microsoft Try It' it
{
"rh": "0asdfaxxxxxxxxxxxxxxxxxxxxx",
"scp": "App.Read.All Capacity.Read.All Capacity.ReadWrite.All Content.Create Dashboard.Read.All Dashboard.ReadWrite.All Dataflow.Read.All Dataflow.ReadWrite.All Dataset.Read.All Dataset.ReadWrite.All Gateway.Read.All Gateway.ReadWrite.All Pipeline.Deploy Pipeline.Read.All Pipeline.ReadWrite.All Report.Read.All Report.ReadWrite.All StorageAccount.Read.All StorageAccount.ReadWrite.All Tenant.Read.All Tenant.ReadWrite.All UserState.ReadWrite.All Workspace.Read.All Workspace.ReadWrite.All",
"signin_state": [
"kmsi"
],
"sub": "xxxxxxxxxxxxx",
"tid": "TenantID",
"unique_name": "MyEmailId",
"upn": "MyEmailId",
"uti": "",
"ver": "1.0",
"wids": [
"xxxxxxxxxxxxxxxx"
]
}
Payload Data I got from Access Token which I got by Postman request
{
"rh": "0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"roles": [
"Tenant.ReadWrite.All",
"Tenant.Read.All"
],
"sub": "xxxxxxxxxxxxxxxxxxxxxxxx",
"tid": "Tenant Id",
"uti": "xxxxxxxxxxxxxxxxxxx",
"ver": "1.0"
}
lbendlin
Super User
3 years agoYou need scopes, not roles. You probably need to register an app and then use the app credentials in Postman.