Forum Discussion

vickyprudhvi's avatar
vickyprudhvi
Helper IV
9 years ago
Solved

Validate Power BI Embed Token

HI I was able to create Embedded Toekn using powerbi create-embed-token Script method using Command Prompt. I would like to decode this token and validate it. Is there any way of doing it because W...
  • Eric_Zhang's avatar
    Eric_Zhang
    9 years ago

    vickyprudhvi wrote:

    Hi Eric_Zhang

    Thank you for your reply. I am able to validate using below site but wen I use username and role in the token it is throwing error.

    Below is the script I am using to generate token. But not working. Any thoughts

    var token2 = '{"ver":"0.2.0","wcn":"' + workspaceCollectionName + '","wid": "' + workspaceId + '","rid":"' + reportId + '","iss":"PowerBISDK","aud":"https://analysis.windows.net/powerbi/api","exp":' + exp + ',"nbf":' + nbf + '","roles": "' + roles + '","username": "' + username + '"}'

     


    vickyprudhvi

    I'm not sure if that way to concat the token is valid or not, could you share me any documentation explaining that way to generate a token. I'm more used to Microsoft.PowerBI.Api in this demo in github,  When role and user name needed, I generate a token this way.

     

    var embedToken = PowerBIToken.CreateReportEmbedToken(this.workspaceCollection, this.workspaceId, report.Id,"username",new string[] { "role1", "role2", "role3" });
  • Eric_Zhang's avatar
    Eric_Zhang
    9 years ago

    vickyprudhvi wrote:

    Hi Eric_Zhang

    As you should have heard regarding new changes with respect to embedding. Now that Azure and PowerBI services are combined. I would like to know how to create embed token with RLS in the new concept. Before we were able to create embed token but today;s world embed token is created in PowerBi Services ( Report ID, Group ID, Aurthentication Code). Is there a way to create embed token in our side. I belive the new embed token is not JWT format.


    vickyprudhvi

    For the new Embedding with non-Power BI users, I got the confirmation that the RLS is on the roadmap and will be available in next quarter. So you may not apply RLS for the new concept at this moment.

     

    No, it is no longer JWT format, the' embed token is encrypted in the new concept.