Forum Discussion
Generate Bearer Token for React embedded report
- Anonymous2 years ago
Hi VikiK ,
The bearer token used in the MS Learn link is likely an embed token generated specifically for the report.
To generate an embed token programmatically, use the `GenerateToken` API. This API provides additional functions, such as creating tokens for multiple items.Troubleshooting 401 Errors:
- Double-check that the access token you're using is valid and has the necessary permissions.
- Ensure that the report ID and embed URL match the report you want to embed.
- Verify that the report is shared with the service principal (app registration) in Power BI.For more details, please refer: reactjs - How to Embed Power BI Report in React app ?
How to embed a Power BI item in a React app | Microsoft Learn
Generate an embed token in Power BI embedded analytics - Power BI | Microsoft Learn
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi VikiK ,
The bearer token used in the MS Learn link is likely an embed token generated specifically for the report.
To generate an embed token programmatically, use the `GenerateToken` API. This API provides additional functions, such as creating tokens for multiple items.
Troubleshooting 401 Errors:
- Double-check that the access token you're using is valid and has the necessary permissions.
- Ensure that the report ID and embed URL match the report you want to embed.
- Verify that the report is shared with the service principal (app registration) in Power BI.
For more details, please refer: reactjs - How to Embed Power BI Report in React app ?
How to embed a Power BI item in a React app | Microsoft Learn
Generate an embed token in Power BI embedded analytics - Power BI | Microsoft Learn
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.