Forum Discussion

NovaLee's avatar
NovaLee
New Member
1 year ago
Solved

Unexpected Embed Token Format and Embedding Failure

Hello, I have a question regarding the Power BI Embed Token.   According to the official documentation, the Embed Token should be returned in the following format:     { "token": "H4sI....AAA=...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi NovaLee 
    Thank you for reaching out microsoft fabric community forum.

    The additional @odata.context property in your response is expected in some cases, though not explicitly mentioned in the documentation. The token should be used as-is without extracting any parts, even if it appears concatenated.

    The "403 Forbidden" error may be due to an invalid or expired token, insufficient API permissions, incorrect embed configuration, or workspace access issues. Please verify the following:

    • Use jwt.io to decode the token and check its expiration (exp).
    • Ensure the accessToken used to generate the embed token has Report.ReadWrite.All permission and admin consent.
    • Confirm that embedUrl, reportId, and groupId match the intended report.
    • Ensure the user embedding the report has access to the workspace.

    To further troubleshoot, test embedding via the Power BI Embedding Playground and validate token generation using Postman or another API tool.
    I've attached the Microsoft documentation that might be helpful to you.
    Generate an embed token in Power BI embedded analytics - Power BI | Microsoft Learn
    Troubleshoot Power BI REST APIs - Power BI | Microsoft Learn

    If this solution helps, please consider giving us Kudos and accepting it as the solution so that it may assist other members in the community.
    Thank you.