Forum Discussion
Operation returned an invalid status code 'Forbidden' when retrieving embed GenerateTokenAsync
- 4 years ago
Thank you for the information . It turned out that embedding Power BI reports on the tenant was disabled wrongly,
- 4 years ago
Thank you s o much! We found the issue. For some reason in Admin center under Tenant --> Developer Setting --> Embed contenet in apps had been removed. Once we specified the security group the issue is resolved.
Thanks,
Maryam
Hi Merry ,
how ever when it reaches to return await PowerBiClient.EmbedToken.GenerateTokenAsync(tokenRequest) it fails.
I think there should be something wrong in generate embed token. As far as I know, your service prinicpal will generate access token and then generate embed token to your customers.
You may refer to this offical blog to learn more details about the workflow.
For refernece:
I suggest you to have a test to generate access token and then generate embed token by bear token(access token) in Postman by Rest API.
Using Postman, we use below POST REST API with body information to get the Bearer Token
To use this, we will need to configure the Body as below,
Then generate embed token in Postman.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Merry4 years agoRegular Visitor
Thank you s o much! We found the issue. For some reason in Admin center under Tenant --> Developer Setting --> Embed contenet in apps had been removed. Once we specified the security group the issue is resolved.
Thanks,
Maryam