I am trying to integrate my powerbi report with my react application, and I am not bale to embed my report
Getting error message as : get report failed
things I have done
- created a powerbi report in my account(pro licence)
- created a application in azure active directory
- created a client secret
- created a security group and added my service principle account to that security group
- added my service principle to my workspace as a admin
- made the neccesay changes in admin portal ( I did not found "Allow service principles to use powerbi api" this option in my admin portal tenant settings and I enabled "Service principals can access read-only admin __API__s")
- I'm trying to use a Power BI REST API to retrieve info about one of our workspaces. To do this, it's crucial we make use of a Service Principal. So far I've used a POST request in Postman to retrieve the bearer token. To do this I've used the 4 parameters I've seen specified in documentation/other tickets, which are: grant_type, client_id, client_secret, scope. This then outputs a bearer token, which gives me confidence that we've set up the Service Principal correctly and that it's working as it should be: so far so good.
- now I have replaced acessToken in my react.js code, then it is showing the following error
- I have tried to get information about my workspace and reports that are present in the workspace through api calls in postman and I got those information also, but not able to embed in my react application
- and here is my react.js code snippet
```javascript
import { PowerBIEmbed } from 'powerbi-client-react';
import { models } from 'powerbi-client'; function Dashboard() {
return (
<div>
</div>
);
} export default Dashboard;